chore: Follow up image viewer
This commit is contained in:
parent
1ef0289b6a
commit
8613010c5e
1 changed files with 14 additions and 14 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue