fix patient gird

merge-requests/928/head
Elham Rababh 4 years ago
parent bd133f8f31
commit ae5c9170a7

@ -31,11 +31,6 @@ class HomePageCard extends StatelessWidget {
width: width, width: width,
margin: this.margin, margin: this.margin,
decoration: BoxDecoration( decoration: BoxDecoration(
// color: !hasBorder
// ? color != null
// ? color
// : HexColor('#050705').withOpacity(opacity)
// : Colors.white,
gradient: gradient, gradient: gradient,
borderRadius: BorderRadius.circular(20.0), borderRadius: BorderRadius.circular(20.0),
border: hasBorder border: hasBorder

@ -88,38 +88,38 @@ class ProfileGridForOther extends StatelessWidget {
? patient.appointmentNo == null ? patient.appointmentNo == null
: patient.patientStatusType != 43 || patient.appointmentNo == null), : patient.patientStatusType != 43 || patient.appointmentNo == null),
]; ];
return Padding(
return Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15), padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15),
child: StaggeredGridView.countBuilder( child: GridView(
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
crossAxisSpacing: 8, physics: BouncingScrollPhysics(),
// if you want IOS bouncing effect, otherwise remove this line
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisSpacing: 10,
mainAxisSpacing: 8, mainAxisSpacing: 8,
crossAxisCount: 3, crossAxisCount: 3,
itemCount: cardsList.length, ),
staggeredTileBuilder: (int index) => StaggeredTile.fit(1), //change the number as you want
itemBuilder: (BuildContext context, int index) => PatientProfileButton( children: cardsList.map((item) {
return PatientProfileButton(
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
from: from, from: from,
to: to, to: to,
nameLine1: cardsList[index].nameLine1, nameLine1: item.nameLine1,
nameLine2: cardsList[index].nameLine2, nameLine2: item.nameLine2,
route: cardsList[index].route, route: item.route,
icon: cardsList[index].icon, icon: item.icon,
isInPatient: cardsList[index].isInPatient, isInPatient: item.isInPatient,
isDischargedPatient: cardsList[index].isDischargedPatient, isDischargedPatient: item.isDischargedPatient,
isDisable: cardsList[index].isDisable, isDisable: item.isDisable,
onTap: cardsList[index].onTap, onTap: item.onTap,
isLoading: cardsList[index].isLoading, isLoading: item.isLoading,
isFromLiveCare: isFromLiveCare), );
), }).toList(),
), ),
],
); );
} }
} }

@ -66,37 +66,39 @@ class ProfileGridForSearch extends StatelessWidget {
isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false), isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false),
]; ];
return Column(
children: [ return Padding(
Padding(
padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15), padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15),
child: StaggeredGridView.countBuilder( child: GridView(
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
crossAxisSpacing: 8, physics: BouncingScrollPhysics(),
// if you want IOS bouncing effect, otherwise remove this line
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisSpacing: 10,
mainAxisSpacing: 8, mainAxisSpacing: 8,
crossAxisCount: 3, crossAxisCount: 3,
itemCount: cardsList.length, ),
staggeredTileBuilder: (int index) => StaggeredTile.fit(1), //change the number as you want
itemBuilder: (BuildContext context, int index) => PatientProfileButton( children: cardsList.map((item) {
return PatientProfileButton(
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
from: from, from: from,
to: to, to: to,
nameLine1: cardsList[index].nameLine1, nameLine1: item.nameLine1,
nameLine2: cardsList[index].nameLine2, nameLine2: item.nameLine2,
route: cardsList[index].route, route: item.route,
icon: cardsList[index].icon, icon: item.icon,
isInPatient: cardsList[index].isInPatient, isInPatient: item.isInPatient,
isDischargedPatient: cardsList[index].isDischargedPatient, isDischargedPatient: item.isDischargedPatient,
isDisable: cardsList[index].isDisable, isDisable: item.isDisable,
onTap: cardsList[index].onTap, onTap: item.onTap,
isLoading: cardsList[index].isLoading, isLoading: item.isLoading,
), );
), }).toList(),
), ),
],
); );
} }
} }

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save