Skip to content

Commit

Permalink
[Application] Minor fix to the _canGoToNextPage and _canGoToPreviousP…
Browse files Browse the repository at this point in the history
…age in the chart_elements_bloc.dart
  • Loading branch information
Wolfteam committed Jul 23, 2022
1 parent 336c449 commit 997a619
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/application/charts/elements/chart_elements_bloc.dart
Expand Up @@ -155,9 +155,9 @@ class ChartElementsBloc extends Bloc<ChartElementsEvent, ChartElementsState> {

bool _canGoToFirstPage(double version) => version > versions.first;

bool _canGoToNextPage(double version) => version + gameVersionIncrementsBy <= versions.last;
bool _canGoToNextPage(double version) => (version + gameVersionIncrementsBy).truncateToDecimalPlaces() <= versions.last;

bool _canGoToPreviousPage(double version) => version - gameVersionIncrementsBy >= versions.first;
bool _canGoToPreviousPage(double version) => (version - gameVersionIncrementsBy).truncateToDecimalPlaces() >= versions.first;

bool _canGoToLastPage(double version) => version < versions.last;
}

0 comments on commit 997a619

Please sign in to comment.