Added refreshindicator for timetable

This commit is contained in:
Elias Müller 2024-02-17 13:26:40 +01:00
parent b18aa5a99e
commit c2f05da96e

View File

@ -99,7 +99,8 @@ class _TimetableState extends State<Timetable> {
GetHolidaysResponse holidays = value.getHolidaysResponse;
return GestureDetector(
return RefreshIndicator(
child: GestureDetector(
onScaleStart: (details) => baseElementScale = elementScale,
onScaleUpdate: (details) {
setState(() {
@ -155,6 +156,11 @@ class _TimetableState extends State<Timetable> {
allowDragAndDrop: false,
allowViewNavigation: false,
),
),
onRefresh: () async {
Provider.of<TimetableProps>(context, listen: false).run(renew: true);
return Future.delayed(const Duration(seconds: 3));
}
);
},
),