Skip to content

Commit

Permalink
Update optimized_previous_button.dart / Fixed canGoToPrevoiusPageProv…
Browse files Browse the repository at this point in the history
…ider condition (#2812)
  • Loading branch information
JSimonDev authored Aug 13, 2023
1 parent a11b883 commit 60aaaf8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ final pageIndexProvider = StateProvider<int>((ref) => 0);
/* highlight-start */
final canGoToPreviousPageProvider = Provider<bool>((ref) {
/* highlight-end */
return ref.watch(pageIndexProvider) == 0;
return ref.watch(pageIndexProvider) > 0;
});

class PreviousButton extends ConsumerWidget {
Expand Down

0 comments on commit 60aaaf8

Please sign in to comment.