forked from eatvio/eatvio_app
<fix>[profile]: Null check for city and countr selector
This commit is contained in:
@@ -87,6 +87,8 @@ class MyProfileBloc extends Bloc<MyProfileEvent, MyProfileState> {
|
||||
dateFormController: currentState.dateFormController,
|
||||
hypoFormController: currentState.hypoFormController,
|
||||
hyperFormController: currentState.hyperFormController,
|
||||
selectedCity: currentState.selectedCity,
|
||||
selectedCountry: currentState.selectedCountry,
|
||||
));
|
||||
} else {
|
||||
var plans = []
|
||||
@@ -187,6 +189,8 @@ class MyProfileBloc extends Bloc<MyProfileEvent, MyProfileState> {
|
||||
text: data['userDetails']['additional_info']),
|
||||
dateFormController:
|
||||
TextEditingController(text: data['userDetails']['birthdate']),
|
||||
selectedCity: data['userDetails']['city'],
|
||||
selectedCountry: data['userDetails']['country'],
|
||||
));
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -565,8 +565,8 @@ class _ExpandableListState extends State<ExpandableList> {
|
||||
'favorite_foods': state?.favoriteFormController?.text,
|
||||
'unfavorite_foods': state?.unfavoriteFormController?.text,
|
||||
'additional_info': state?.additionalFormController?.text,
|
||||
'country': state?.selectedCountry,
|
||||
'city': state?.selectedCity,
|
||||
'country': state?.selectedCountry ?? 'Россия',
|
||||
'city': state?.selectedCity ?? 'Москва',
|
||||
'has_hypo': state?.hypoFormController,
|
||||
'has_hyper': state?.hyperFormController,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user