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,
margin: this.margin,
decoration: BoxDecoration(
// color: !hasBorder
// ? color != null
// ? color
// : HexColor('#050705').withOpacity(opacity)
// : Colors.white,
gradient: gradient,
borderRadius: BorderRadius.circular(20.0),
border: hasBorder

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

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

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