Added refreshindicator for timetable
This commit is contained in:
parent
b18aa5a99e
commit
c2f05da96e
@ -99,7 +99,8 @@ class _TimetableState extends State<Timetable> {
|
|||||||
|
|
||||||
GetHolidaysResponse holidays = value.getHolidaysResponse;
|
GetHolidaysResponse holidays = value.getHolidaysResponse;
|
||||||
|
|
||||||
return GestureDetector(
|
return RefreshIndicator(
|
||||||
|
child: GestureDetector(
|
||||||
onScaleStart: (details) => baseElementScale = elementScale,
|
onScaleStart: (details) => baseElementScale = elementScale,
|
||||||
onScaleUpdate: (details) {
|
onScaleUpdate: (details) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -155,6 +156,11 @@ class _TimetableState extends State<Timetable> {
|
|||||||
allowDragAndDrop: false,
|
allowDragAndDrop: false,
|
||||||
allowViewNavigation: false,
|
allowViewNavigation: false,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
onRefresh: () async {
|
||||||
|
Provider.of<TimetableProps>(context, listen: false).run(renew: true);
|
||||||
|
return Future.delayed(const Duration(seconds: 3));
|
||||||
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user