Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show exercise names in gym mode navigation #300

Closed
wants to merge 2 commits into from

Conversation

mohammadrafigh
Copy link
Contributor

Proposed Changes

  • Fetch exercise names from provider instead of showing ids in gym mode navigation dialog

Related Issues (if applicable)

Please check that the PR fulfills these requirements

  • Set a 100 character limit in your editor/IDE to avoid white space diffs in the PR
  • Tests for the changes have been added (for bug fixes / features)
  • Added yourself to AUTHORS.md

@rolandgeider
Copy link
Member

Now that I'm looking at the code. Wouldn't it be easier if we modified _exercisePages? Right now it is basically only a list that contains the UUID and the position. We could convert it e.g. to a Map<ExerciseBase, int> and this would allow us to even show the exercise image in the dropdown (don't know if this would be a good idea UX wise, but we would have the possibility)

@mohammadrafigh
Copy link
Contributor Author

@rolandgeider yes sure, I did this first, but I got some exceptions due to unknown Map types. I know I should somewhere define a fromJson for that type to work but since I'm a newbie on Dart so avoided that :D. I will take a look again and try to go that way.

@rolandgeider
Copy link
Member

we don't need to convert to json, we should be able to just put the whole object there. But if this makes problems, we can just use your approach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instead of showing exercise names the app shows exercise id
2 participants