diff --git a/lib/localization/ru/ru_translations.dart b/lib/localization/ru/ru_translations.dart index 779c4f78..85794150 100644 --- a/lib/localization/ru/ru_translations.dart +++ b/lib/localization/ru/ru_translations.dart @@ -51,9 +51,9 @@ final Map ru = { "your_favorite_sports": "Ваши спортивные увлечения?", // favorite_foods Screen - "favorite_foods": "Любимые продукты:", + "favorite_foods": "Любимые продукты", "favorite_unfavorite_foods": "Ваши любимые/нелюбимые продукты питания?", - "unfavorite_foods": "Нелюбимые продукты:", + "unfavorite_foods": "Нелюбимые продукты", // schedule Screen "your_schedule": "Ваш режим дня?", @@ -61,7 +61,7 @@ final Map ru = { "Расскажите в свободной форме о том как просыпаетесь, когда едите, когда ложитесь спать:", // additional_information Screen - "additional_information": "Дополнительная информация:", + "additional_information": "Дополнительная информация", "enter_additional_information": "Введите любую дополнительную информацию на своё усмотрение:", diff --git a/lib/presentation/profile/my_profile_screen/bloc/my_profile_bloc.dart b/lib/presentation/profile/my_profile_screen/bloc/my_profile_bloc.dart index 9b9e3d47..022d636e 100644 --- a/lib/presentation/profile/my_profile_screen/bloc/my_profile_bloc.dart +++ b/lib/presentation/profile/my_profile_screen/bloc/my_profile_bloc.dart @@ -73,6 +73,9 @@ class MyProfileBloc extends Bloc { currentState.downPressureFormController, allergiesFormController: currentState.allergiesFormController, pillsFormController: currentState.pillsFormController, + favoriteFormController: currentState.favoriteFormController, + unfavoriteFormController: currentState.unfavoriteFormController, + additionalFormController: currentState.additionalFormController, sportsFormController: currentState.sportsFormController, dateFormController: currentState.dateFormController, )); @@ -116,6 +119,12 @@ class MyProfileBloc extends Bloc { text: data['userDetails']['about_taking_pils']), sportsFormController: TextEditingController( text: data['userDetails']['about_sport_hobbies']), + favoriteFormController: TextEditingController( + text: data['userDetails']['favorite_foods']), + unfavoriteFormController: TextEditingController( + text: data['userDetails']['unfavorite_foods']), + additionalFormController: TextEditingController( + text: data['userDetails']['additional_info']), dateFormController: TextEditingController(text: data['userDetails']['birthdate']), )); diff --git a/lib/presentation/profile/my_profile_screen/bloc/my_profile_state.dart b/lib/presentation/profile/my_profile_screen/bloc/my_profile_state.dart index d82c46af..49d86c8e 100644 --- a/lib/presentation/profile/my_profile_screen/bloc/my_profile_state.dart +++ b/lib/presentation/profile/my_profile_screen/bloc/my_profile_state.dart @@ -46,6 +46,9 @@ class MyProfileLoadedState extends MyProfileState { this.allergiesFormController, this.pillsFormController, this.sportsFormController, + this.favoriteFormController, + this.unfavoriteFormController, + this.additionalFormController, this.circumferences}) : super(myProfileModelObj: null); @@ -74,6 +77,9 @@ class MyProfileLoadedState extends MyProfileState { TextEditingController? allergiesFormController; TextEditingController? pillsFormController; TextEditingController? sportsFormController; + TextEditingController? favoriteFormController; + TextEditingController? unfavoriteFormController; + TextEditingController? additionalFormController; String? token; String? selectedCountry; String? selectedCity; @@ -105,6 +111,9 @@ class MyProfileLoadedState extends MyProfileState { allergiesFormController, pillsFormController, sportsFormController, + favoriteFormController, + unfavoriteFormController, + additionalFormController, selectedCountry, selectedCity, ]; @@ -132,6 +141,9 @@ class MyProfileLoadedState extends MyProfileState { TextEditingController? allergiesFormController, TextEditingController? pillsFormController, TextEditingController? sportsFormController, + TextEditingController? favoriteFormController, + TextEditingController? unfavoriteFormController, + TextEditingController? additionalFormController, String? token, String? selectedCountry, String? selectedCity, @@ -176,6 +188,12 @@ class MyProfileLoadedState extends MyProfileState { allergiesFormController ?? this.allergiesFormController, pillsFormController: pillsFormController ?? this.pillsFormController, sportsFormController: sportsFormController ?? this.sportsFormController, + favoriteFormController: + favoriteFormController ?? this.favoriteFormController, + unfavoriteFormController: + unfavoriteFormController ?? this.unfavoriteFormController, + additionalFormController: + additionalFormController ?? this.additionalFormController, token: token ?? this.token, selectedCountry: selectedCountry ?? this.selectedCountry, selectedCity: selectedCity ?? this.selectedCity, diff --git a/lib/presentation/profile/my_profile_screen/my_settings_screen.dart b/lib/presentation/profile/my_profile_screen/my_settings_screen.dart index 72d10dec..6f666b0a 100644 --- a/lib/presentation/profile/my_profile_screen/my_settings_screen.dart +++ b/lib/presentation/profile/my_profile_screen/my_settings_screen.dart @@ -448,6 +448,21 @@ class _ExpandableListState extends State { decoration: InputDecoration(labelText: 'your_favorite_sports'.tr), maxLines: null, ), + TextField( + controller: state.favoriteFormController, + decoration: InputDecoration(labelText: 'favorite_foods'.tr), + maxLines: null, + ), + TextField( + controller: state.unfavoriteFormController, + decoration: InputDecoration(labelText: 'unfavorite_foods'.tr), + maxLines: null, + ), + TextField( + controller: state.additionalFormController, + decoration: InputDecoration(labelText: 'additional_information'.tr), + maxLines: null, + ), Row( children: [ HypoHyperSwitch('do_you_have_hypotension_tendency'.tr),