-
Notifications
You must be signed in to change notification settings - Fork 12
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
Feat/gh 357/account information screen #374
base: development
Are you sure you want to change the base?
Conversation
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.
I need to look through it more in depth at some point this week.
lib/presentation/account_information/widgets/contact_info_widgets/build_email_row.dart
Outdated
Show resolved
Hide resolved
lib/presentation/account_information/widgets/contact_info_widgets/build_email_row.dart
Outdated
Show resolved
Hide resolved
lib/presentation/account_information/widgets/contact_info_widgets/build_email_row.dart
Outdated
Show resolved
Hide resolved
final IProfileRepository _profileRepository; | ||
PersonalInformationBloc(this._profileRepository) : super(_Fetching()) { | ||
_profileRepository.getUserProfile().then((profileOrFailure) { | ||
profileOrFailure.fold((l) {}, (profile) { |
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.
You should handle the error state as well.
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.
I'm not sure how we should deal with this error, since you shouldn't be able to reach the Account Information screen without being logged in, and thus having a profile.
What do you think is best @wizlif ?
I see these few options:
- Create an anonymous version of the Widget that uses the profile (We'll use that as an error widget)
- Show loading state (We'll implement a shimmer version), and a snackbar with an error
lib/presentation/account_information/widgets/contact_info_widgets/build_email_row.dart
Show resolved
Hide resolved
mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
children: [ | ||
Text( | ||
'${location?.name ?? "No"}, ${location?.code ?? "Country"}', |
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.
Create a getter in the location model to do this.
I have created the information page:
Notes: I couldn't find any bugs but need to review