From 9f704952759a1703e4e011a6180779252d4747d6 Mon Sep 17 00:00:00 2001 From: Aadeesh11 <66922161+Aadeesh11@users.noreply.github.com> Date: Sun, 5 Dec 2021 12:24:08 +0530 Subject: [PATCH] fix: hidden FAB's don't do anything. (#174) Fixes #173. --- lib/ui/views/ib/ib_page_view.dart | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/ui/views/ib/ib_page_view.dart b/lib/ui/views/ib/ib_page_view.dart index 911cb90f..0316315c 100644 --- a/lib/ui/views/ib/ib_page_view.dart +++ b/lib/ui/views/ib/ib_page_view.dart @@ -356,7 +356,13 @@ class _IbPageViewState extends State { heroTag: 'previousPage', mini: true, backgroundColor: Theme.of(context).primaryIconTheme.color, - onPressed: () => widget.setPage(widget.chapter.prev), + onPressed: () { + //If FAB are not visible do not do anything. + if (!_isFabsVisible) { + return; + } + widget.setPage(widget.chapter.prev); + }, child: const Icon( Icons.arrow_back_rounded, color: IbTheme.primaryColor, @@ -379,7 +385,13 @@ class _IbPageViewState extends State { heroTag: 'nextPage', mini: true, backgroundColor: Theme.of(context).primaryIconTheme.color, - onPressed: () => widget.setPage(widget.chapter.next), + onPressed: () { + //If FAB are not visible do not do anything. + if (!_isFabsVisible) { + return; + } + widget.setPage(widget.chapter.next); + }, child: const Icon( Icons.arrow_forward_rounded, color: IbTheme.primaryColor,