-
-
Notifications
You must be signed in to change notification settings - Fork 320
User can't be able to add new exercise if their email is not verified #332
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
Conversation
fixes #258 |
Great, will try to review this later today |
lib/screens/add_exercise_screen.dart
Outdated
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
Text( | ||
'Your profile needs to be verified in order to add any exercise', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you mark the text as translatable? You just need to add an entry to app_en.arb and then you can use it with AppLocalizations.of(context).foo
(sometimes the IDE doesn't pick this up right away and complains that foo doesn't exists, but the app builds just fine).
I would also suggest that we use the same text as in the web application: "You can only contribute exercises if your account is older than {{days}} days and have verified your email". We can just store the number of days in consts.dart with 14, at the moment this is not configurable.
lib/screens/add_exercise_screen.dart
Outdated
'Your profile needs to be verified in order to add any exercise', | ||
style: TextStyle( | ||
color: Colors.black, | ||
fontSize: 30, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps not hard code the font size here? Something like style: Theme.of(context).textTheme.headline4
is probably better if we change the theme
lib/screens/add_exercise_screen.dart
Outdated
child: Container( | ||
padding: EdgeInsets.all(15), | ||
child: Text( | ||
'Profile Screen', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, just use AppLocalizations.of(context).userProfile
(and something like a TextButton?)
Got it! |
@rolandgeider done all the fixes! |
Merged, thanks |
Added screen which redirects to the user form whenever the user tries to add an exercise when their email is not verified.
Related Issues (if applicable)
Please check that the PR fulfills these requirements