Skip to content

Commit

Permalink
fix: hidden FAB's don't do anything. (CircuitVerse#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aadeesh11 authored Dec 5, 2021
1 parent fdd62be commit 9f70495
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions lib/ui/views/ib/ib_page_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,13 @@ class _IbPageViewState extends State<IbPageView> {
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,
Expand All @@ -379,7 +385,13 @@ class _IbPageViewState extends State<IbPageView> {
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,
Expand Down

0 comments on commit 9f70495

Please sign in to comment.