Merge branch 'pagination_doctor_repay' into 'development'

Pagination doctor repay

See merge request Cloud_Solution/doctor_app_flutter!799
merge-requests/800/merge
Mohammad Aljammal 5 years ago
commit b3e350ecaa

@ -58,8 +58,8 @@ class _DoctorReplyScreenState extends State<DoctorReplyScreen> {
child: NotificationListener( child: NotificationListener(
child: ListView.builder( child: ListView.builder(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
itemCount: model.listDoctorWorkingHoursTable.length,
shrinkWrap: true, shrinkWrap: true,
itemBuilder: (BuildContext ctxt, int index) { itemBuilder: (BuildContext ctxt, int index) {
return Column( return Column(
children: [ children: [
@ -83,20 +83,19 @@ class _DoctorReplyScreenState extends State<DoctorReplyScreen> {
reply: model reply: model
.listDoctorWorkingHoursTable[index]), .listDoctorWorkingHoursTable[index]),
), ),
if(model.state == ViewState.BusyLocal &&index ==model.listDoctorWorkingHoursTable.length-1) if(model.state == ViewState.BusyLocal && index == model.listDoctorWorkingHoursTable.length-1)
DrAppCircularProgressIndeicator() DrAppCircularProgressIndeicator()
], ],
); );
}), }),
onNotification: (t) { onNotification: (t) {
if (t is ScrollEndNotification && if (t is ScrollEndNotification &&
model.state != ViewState.BusyLocal) { model.state != ViewState.BusyLocal) {
print("${model.state}");
setState(() { setState(() {
pageIndex++; pageIndex++;
}); });
model.getDoctorReply(pageIndex: pageIndex); model.getDoctorReply(pageIndex: pageIndex);
} }
return; return;
}, },

Loading…
Cancel
Save