From 66e33b708537ff0fd4ccc4c4c4f683534777543b Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Wed, 25 Aug 2021 11:26:41 +0300 Subject: [PATCH] fix error happen while scrolling --- lib/screens/doctor/doctor_reply_screen.dart | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/screens/doctor/doctor_reply_screen.dart b/lib/screens/doctor/doctor_reply_screen.dart index 9047bb2d..fa5ae47d 100644 --- a/lib/screens/doctor/doctor_reply_screen.dart +++ b/lib/screens/doctor/doctor_reply_screen.dart @@ -58,8 +58,8 @@ class _DoctorReplyScreenState extends State { child: NotificationListener( child: ListView.builder( scrollDirection: Axis.vertical, + itemCount: model.listDoctorWorkingHoursTable.length, shrinkWrap: true, - itemBuilder: (BuildContext ctxt, int index) { return Column( children: [ @@ -83,20 +83,20 @@ class _DoctorReplyScreenState extends State { reply: model .listDoctorWorkingHoursTable[index]), ), - if(model.state == ViewState.BusyLocal &&index ==model.listDoctorWorkingHoursTable.length-1) + if(model.state == ViewState.BusyLocal && index == model.listDoctorWorkingHoursTable.length-1) DrAppCircularProgressIndeicator() ], ); }), - onNotification: (t) { + onNotification: (t) { if (t is ScrollEndNotification && model.state != ViewState.BusyLocal) { print("${model.state}"); - setState(() { - pageIndex++; - }); - model.getDoctorReply(pageIndex: pageIndex); + // setState(() { + // pageIndex++; + // }); + model.getDoctorReply(pageIndex: 2); } return; },