Feature/end_workout_button in "jump to" section #955
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Added a button to end workout in the "jump to" section during gym mode.
This button is not accessible from
start_page.dart
norsession_page.dart
in the jump_to section. This is an arbitrary choice, as ending a workout without having started it, or ending an ended workout doesn't seem logical.Other than that, the button is accessible from other pages of the gym mode.
In order for the end workout button to work, using the
_controller.animateToPage(...)
, I needed to know how many pages there were. I therefore added a_totalPages
attribute ingym_mode.dart
, that is calculated in already-existing function_calculatePages()
.Related Issue(s)
Closes #920 : Option to end workout in the "jump to" section
Please check that the PR fulfills these requirements
(run
dart format .
)///
). -> doesn't seem to have an existing doc for that partWaiting for your feedback to rework on necessary parts :).