changing list genrate to list builder

merge-requests/820/head
hussam al-habibeh 5 years ago
parent b461af1be2
commit 1ba47515c6

@ -162,9 +162,13 @@ class PrescriptionsPage extends StatelessWidget {
// height: 12,
// ),
...List.generate(
model.medicationForInPatient.length,
(index) => InkWell(
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.medicationForInPatient.length,
itemBuilder: (context, index) {
//model.medicationForInPatient.length,
return InkWell(
onTap: () => Navigator.push(
context,
FadePage(
@ -193,7 +197,8 @@ class PrescriptionsPage extends StatelessWidget {
model.medicationForInPatient[index].prescriptionDatetime,
),
createdBy: model.medicationForInPatient[index].createdBy.toString(),
))),
));
}),
if (model.medicationForInPatient.length == 0)
Center(
child: Column(

Loading…
Cancel
Save