chore: Follow up image viewer

pull/1535/merge
Krille 2 months ago
parent 1ef0289b6a
commit 8613010c5e
No known key found for this signature in database
GPG Key ID: E067ECD60F1A0652

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

Loading…
Cancel
Save