chore: Follow up image viewer

This commit is contained in:
Krille 2025-01-06 10:56:02 +01:00
commit 8613010c5e
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652

View file

@ -45,22 +45,22 @@ class ImageViewerController extends State<ImageViewer> {
late final List<Event> allEvents; late final List<Event> allEvents;
void prevImage() { void prevImage() async {
setState(() { await pageController.previousPage(
pageController.previousPage( duration: FluffyThemes.animationDuration,
duration: FluffyThemes.animationDuration, curve: FluffyThemes.animationCurve,
curve: FluffyThemes.animationCurve, );
); if (!mounted) return;
}); setState(() {});
} }
void nextImage() { void nextImage() async {
setState(() { await pageController.nextPage(
pageController.nextPage( duration: FluffyThemes.animationDuration,
duration: FluffyThemes.animationDuration, curve: FluffyThemes.animationCurve,
curve: FluffyThemes.animationCurve, );
); if (!mounted) return;
}); setState(() {});
} }
int get _index => pageController.page?.toInt() ?? 0; int get _index => pageController.page?.toInt() ?? 0;