From 726b74a236bf52ac2698c41648d233f22ffc54f0 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 15 Jul 2024 16:33:33 +0300 Subject: [PATCH] feature(registration): iter6 --- .env | 3 +- .../user_registration_model.dart | 24 +- .../user_registration_model.freezed.dart | 177 ++- .../user_registration_model.g.dart | 25 +- .../registration/consts/cities_list.dart} | 159 +-- .../registration_cubit.dart | 35 +- .../pages}/additional_information_screen.dart | 0 .../presentation/pages}/allergies_screen.dart | 0 .../pages}/blood_pressure_screen.dart | 22 +- .../pages}/body_circumferences_screen.dart | 12 +- .../pages/city_of_living_screen.dart | 88 ++ .../pages}/credentials_screen.dart | 0 .../pages}/date_of_birth_screen.dart | 0 .../pages}/favorite_foods_screen.dart | 0 .../pages}/favorite_sports_screen.dart | 0 .../presentation/pages}/gender_screen.dart | 0 .../presentation/pages}/height_screen.dart | 4 +- .../pages}/language_select_screen.dart | 0 .../pages}/medicine_intake_screen.dart | 0 .../presentation/pages}/name_screen.dart | 0 .../pages/registration_screen.dart | 46 +- .../presentation/pages}/weight_screen.dart | 4 +- .../repositories/registration_repository.dart | 4 +- .../services/registration_service.dart | 3 +- .../services/registration_service.g.dart | 5 +- .../auth/auth_screen/auth_screen.dart | 115 +- .../bloc/additional_information_bloc.dart | 22 - .../bloc/additional_information_event.dart | 16 - .../bloc/additional_information_state.dart | 31 - .../models/additional_information_model.dart | 20 - .../allergies_screen/bloc/allergies_bloc.dart | 20 - .../bloc/allergies_event.dart | 16 - .../bloc/allergies_state.dart | 31 - .../models/allergies_model.dart | 20 - .../app_navigation_screen.dart | 233 ---- .../bloc/app_navigation_bloc.dart | 18 - .../bloc/app_navigation_event.dart | 16 - .../bloc/app_navigation_state.dart | 21 - .../models/app_navigation_model.dart | 16 - .../bloc/blood_pressure_bloc.dart | 72 - .../bloc/blood_pressure_event.dart | 39 - .../bloc/blood_pressure_state.dart | 50 - .../models/blood_pressure_model.dart | 25 - .../bloc/body_circumferences_bloc.dart | 25 - .../bloc/body_circumferences_event.dart | 16 - .../bloc/body_circumferences_state.dart | 46 - .../models/body_circumferences_model.dart | 20 - .../bloc/city_of_living_bloc.dart | 37 - .../bloc/city_of_living_event.dart | 28 - .../bloc/city_of_living_state.dart | 37 - .../models/city_of_living_model.dart | 1153 ----------------- .../bloc/credentials_bloc.dart | 24 - .../bloc/credentials_event.dart | 16 - .../bloc/credentials_state.dart | 49 - .../models/credentials_model.dart | 22 - .../bloc/date_of_birth_bloc.dart | 18 - .../bloc/date_of_birth_event.dart | 16 - .../bloc/date_of_birth_state.dart | 20 - .../models/date_of_birth_model.dart | 21 - .../bloc/favorite_foods_bloc.dart | 22 - .../bloc/favorite_foods_event.dart | 16 - .../bloc/favorite_foods_state.dart | 39 - .../models/favorite_foods_model.dart | 20 - .../bloc/favorite_sports_bloc.dart | 21 - .../bloc/favorite_sports_event.dart | 16 - .../bloc/favorite_sports_state.dart | 32 - .../models/favorite_sports_model.dart | 20 - .../gender_screen/bloc/gender_bloc.dart | 29 - .../gender_screen/bloc/gender_event.dart | 26 - .../gender_screen/bloc/gender_state.dart | 30 - .../gender_screen/models/gender_model.dart | 20 - .../height_screen/bloc/height_bloc.dart | 22 - .../height_screen/bloc/height_event.dart | 16 - .../height_screen/bloc/height_state.dart | 30 - .../height_screen/models/height_model.dart | 25 - .../bloc/language_select_bloc.dart | 35 - .../bloc/language_select_event.dart | 28 - .../bloc/language_select_state.dart | 32 - .../models/language_select_model.dart | 51 - .../bloc/medicine_intake_bloc.dart | 21 - .../bloc/medicine_intake_event.dart | 16 - .../bloc/medicine_intake_state.dart | 32 - .../models/medicine_intake_model.dart | 20 - .../name_screen/bloc/name_bloc.dart | 22 - .../name_screen/bloc/name_event.dart | 16 - .../name_screen/bloc/name_state.dart | 36 - .../name_screen/models/name_model.dart | 21 - .../splash_screen/bloc/splash_bloc.dart | 26 - .../splash_screen/bloc/splash_event.dart | 16 - .../splash_screen/bloc/splash_state.dart | 20 - .../splash_screen/models/splash_model.dart | 16 - .../splash_screen/splash_screen.dart | 36 - .../weight_screen/bloc/weight_bloc.dart | 22 - .../weight_screen/bloc/weight_event.dart | 16 - .../weight_screen/bloc/weight_state.dart | 30 - .../weight_screen/models/weight_model.dart | 25 - 96 files changed, 358 insertions(+), 3503 deletions(-) rename lib/{presentation/registration/city_of_living_screen/city_of_living_screen.dart => features/registration/consts/cities_list.dart} (79%) rename lib/{presentation/registration/additional_information_screen => features/registration/presentation/pages}/additional_information_screen.dart (100%) rename lib/{presentation/registration/allergies_screen => features/registration/presentation/pages}/allergies_screen.dart (100%) rename lib/{presentation/registration/blood_pressure_screen => features/registration/presentation/pages}/blood_pressure_screen.dart (89%) rename lib/{presentation/registration/body_circumferences_screen => features/registration/presentation/pages}/body_circumferences_screen.dart (85%) create mode 100644 lib/features/registration/presentation/pages/city_of_living_screen.dart rename lib/{presentation/registration/credentials_screen => features/registration/presentation/pages}/credentials_screen.dart (100%) rename lib/{presentation/registration/date_of_birth_screen => features/registration/presentation/pages}/date_of_birth_screen.dart (100%) rename lib/{presentation/registration/favorite_foods_screen => features/registration/presentation/pages}/favorite_foods_screen.dart (100%) rename lib/{presentation/registration/favorite_sports_screen => features/registration/presentation/pages}/favorite_sports_screen.dart (100%) rename lib/{presentation/registration/gender_screen => features/registration/presentation/pages}/gender_screen.dart (100%) rename lib/{presentation/registration/height_screen => features/registration/presentation/pages}/height_screen.dart (93%) rename lib/{presentation/registration/language_select_screen => features/registration/presentation/pages}/language_select_screen.dart (100%) rename lib/{presentation/registration/medicine_intake_screen => features/registration/presentation/pages}/medicine_intake_screen.dart (100%) rename lib/{presentation/registration/name_screen => features/registration/presentation/pages}/name_screen.dart (100%) rename lib/{presentation/registration/weight_screen => features/registration/presentation/pages}/weight_screen.dart (93%) delete mode 100644 lib/presentation/registration/additional_information_screen/bloc/additional_information_bloc.dart delete mode 100644 lib/presentation/registration/additional_information_screen/bloc/additional_information_event.dart delete mode 100644 lib/presentation/registration/additional_information_screen/bloc/additional_information_state.dart delete mode 100644 lib/presentation/registration/additional_information_screen/models/additional_information_model.dart delete mode 100644 lib/presentation/registration/allergies_screen/bloc/allergies_bloc.dart delete mode 100644 lib/presentation/registration/allergies_screen/bloc/allergies_event.dart delete mode 100644 lib/presentation/registration/allergies_screen/bloc/allergies_state.dart delete mode 100644 lib/presentation/registration/allergies_screen/models/allergies_model.dart delete mode 100644 lib/presentation/registration/app_navigation_screen/app_navigation_screen.dart delete mode 100644 lib/presentation/registration/app_navigation_screen/bloc/app_navigation_bloc.dart delete mode 100644 lib/presentation/registration/app_navigation_screen/bloc/app_navigation_event.dart delete mode 100644 lib/presentation/registration/app_navigation_screen/bloc/app_navigation_state.dart delete mode 100644 lib/presentation/registration/app_navigation_screen/models/app_navigation_model.dart delete mode 100644 lib/presentation/registration/blood_pressure_screen/bloc/blood_pressure_bloc.dart delete mode 100644 lib/presentation/registration/blood_pressure_screen/bloc/blood_pressure_event.dart delete mode 100644 lib/presentation/registration/blood_pressure_screen/bloc/blood_pressure_state.dart delete mode 100644 lib/presentation/registration/blood_pressure_screen/models/blood_pressure_model.dart delete mode 100644 lib/presentation/registration/body_circumferences_screen/bloc/body_circumferences_bloc.dart delete mode 100644 lib/presentation/registration/body_circumferences_screen/bloc/body_circumferences_event.dart delete mode 100644 lib/presentation/registration/body_circumferences_screen/bloc/body_circumferences_state.dart delete mode 100644 lib/presentation/registration/body_circumferences_screen/models/body_circumferences_model.dart delete mode 100644 lib/presentation/registration/city_of_living_screen/bloc/city_of_living_bloc.dart delete mode 100644 lib/presentation/registration/city_of_living_screen/bloc/city_of_living_event.dart delete mode 100644 lib/presentation/registration/city_of_living_screen/bloc/city_of_living_state.dart delete mode 100644 lib/presentation/registration/city_of_living_screen/models/city_of_living_model.dart delete mode 100644 lib/presentation/registration/credentials_screen/bloc/credentials_bloc.dart delete mode 100644 lib/presentation/registration/credentials_screen/bloc/credentials_event.dart delete mode 100644 lib/presentation/registration/credentials_screen/bloc/credentials_state.dart delete mode 100644 lib/presentation/registration/credentials_screen/models/credentials_model.dart delete mode 100644 lib/presentation/registration/date_of_birth_screen/bloc/date_of_birth_bloc.dart delete mode 100644 lib/presentation/registration/date_of_birth_screen/bloc/date_of_birth_event.dart delete mode 100644 lib/presentation/registration/date_of_birth_screen/bloc/date_of_birth_state.dart delete mode 100644 lib/presentation/registration/date_of_birth_screen/models/date_of_birth_model.dart delete mode 100644 lib/presentation/registration/favorite_foods_screen/bloc/favorite_foods_bloc.dart delete mode 100644 lib/presentation/registration/favorite_foods_screen/bloc/favorite_foods_event.dart delete mode 100644 lib/presentation/registration/favorite_foods_screen/bloc/favorite_foods_state.dart delete mode 100644 lib/presentation/registration/favorite_foods_screen/models/favorite_foods_model.dart delete mode 100644 lib/presentation/registration/favorite_sports_screen/bloc/favorite_sports_bloc.dart delete mode 100644 lib/presentation/registration/favorite_sports_screen/bloc/favorite_sports_event.dart delete mode 100644 lib/presentation/registration/favorite_sports_screen/bloc/favorite_sports_state.dart delete mode 100644 lib/presentation/registration/favorite_sports_screen/models/favorite_sports_model.dart delete mode 100644 lib/presentation/registration/gender_screen/bloc/gender_bloc.dart delete mode 100644 lib/presentation/registration/gender_screen/bloc/gender_event.dart delete mode 100644 lib/presentation/registration/gender_screen/bloc/gender_state.dart delete mode 100644 lib/presentation/registration/gender_screen/models/gender_model.dart delete mode 100644 lib/presentation/registration/height_screen/bloc/height_bloc.dart delete mode 100644 lib/presentation/registration/height_screen/bloc/height_event.dart delete mode 100644 lib/presentation/registration/height_screen/bloc/height_state.dart delete mode 100644 lib/presentation/registration/height_screen/models/height_model.dart delete mode 100644 lib/presentation/registration/language_select_screen/bloc/language_select_bloc.dart delete mode 100644 lib/presentation/registration/language_select_screen/bloc/language_select_event.dart delete mode 100644 lib/presentation/registration/language_select_screen/bloc/language_select_state.dart delete mode 100644 lib/presentation/registration/language_select_screen/models/language_select_model.dart delete mode 100644 lib/presentation/registration/medicine_intake_screen/bloc/medicine_intake_bloc.dart delete mode 100644 lib/presentation/registration/medicine_intake_screen/bloc/medicine_intake_event.dart delete mode 100644 lib/presentation/registration/medicine_intake_screen/bloc/medicine_intake_state.dart delete mode 100644 lib/presentation/registration/medicine_intake_screen/models/medicine_intake_model.dart delete mode 100644 lib/presentation/registration/name_screen/bloc/name_bloc.dart delete mode 100644 lib/presentation/registration/name_screen/bloc/name_event.dart delete mode 100644 lib/presentation/registration/name_screen/bloc/name_state.dart delete mode 100644 lib/presentation/registration/name_screen/models/name_model.dart delete mode 100644 lib/presentation/registration/splash_screen/bloc/splash_bloc.dart delete mode 100644 lib/presentation/registration/splash_screen/bloc/splash_event.dart delete mode 100644 lib/presentation/registration/splash_screen/bloc/splash_state.dart delete mode 100644 lib/presentation/registration/splash_screen/models/splash_model.dart delete mode 100644 lib/presentation/registration/splash_screen/splash_screen.dart delete mode 100644 lib/presentation/registration/weight_screen/bloc/weight_bloc.dart delete mode 100644 lib/presentation/registration/weight_screen/bloc/weight_event.dart delete mode 100644 lib/presentation/registration/weight_screen/bloc/weight_state.dart delete mode 100644 lib/presentation/registration/weight_screen/models/weight_model.dart diff --git a/.env b/.env index e223a359..0f129f5c 100644 --- a/.env +++ b/.env @@ -1,2 +1,3 @@ SERVER_ROOT='https://mobile-stage.eatvio.ru/api' -STORAGE_URL='https://mobile-stage.eatvio.ru/storage/' \ No newline at end of file +STORAGE_URL='https://mobile-stage.eatvio.ru/storage/' +OFERTA='https://mobile-stage.eatvio.ru/oferta_bs.pdf' \ No newline at end of file diff --git a/lib/data/models/userRegistrationModel/user_registration_model.dart b/lib/data/models/userRegistrationModel/user_registration_model.dart index cae81cd1..686d2068 100644 --- a/lib/data/models/userRegistrationModel/user_registration_model.dart +++ b/lib/data/models/userRegistrationModel/user_registration_model.dart @@ -9,7 +9,7 @@ class UserRegistrationSheet with _$UserRegistrationSheet { required String name, @JsonKey(name: 'first_name') required String firstName, - @JsonKey(name: 'last') + @JsonKey(name: 'last_name') required String lastName, required String email, required String password, @@ -23,22 +23,22 @@ class UserRegistrationSheet with _$UserRegistrationSheet { required String country, required String city, required String lang, - required String weight, - required String height, + required int weight, + required int height, @JsonKey(name: 'chest_circumference') - required String chestCircumference, + required int chestCircumference, @JsonKey(name: 'waist_circumference') - required String waistCircumference, + required int waistCircumference, @JsonKey(name: 'hip_circumference') - required String hipCircumference, + required int hipCircumference, @JsonKey(name: 'blood_pressure_up') - required String bloodPressureUp, + required int bloodPressureUp, @JsonKey(name: 'blood_pressure_down') - required String bloodPressureDown, + required int bloodPressureDown, @JsonKey(name: 'has_hypo') - required String hasHypo, + required int hasHypo, @JsonKey(name: 'has_hyper') - required String hasHyper, + required int hasHyper, @JsonKey(name: 'about_alergy') required String aboutAllergy, @JsonKey(name: 'about_taking_pils') @@ -51,9 +51,9 @@ class UserRegistrationSheet with _$UserRegistrationSheet { required String unfavoriteFoods, @JsonKey(name: 'additional_info') required String additionalInfo, - @Default('1.2') + @Default(1.2) @JsonKey(name: 'activity_coefficient') - String activityCoefficient, + double activityCoefficient, }) = _UserRegistrationSheet; factory UserRegistrationSheet.fromJson(Map json) => _$UserRegistrationSheetFromJson(json); diff --git a/lib/data/models/userRegistrationModel/user_registration_model.freezed.dart b/lib/data/models/userRegistrationModel/user_registration_model.freezed.dart index 9d00a7dd..4aa91df8 100644 --- a/lib/data/models/userRegistrationModel/user_registration_model.freezed.dart +++ b/lib/data/models/userRegistrationModel/user_registration_model.freezed.dart @@ -24,7 +24,7 @@ mixin _$UserRegistrationSheet { String get name => throw _privateConstructorUsedError; @JsonKey(name: 'first_name') String get firstName => throw _privateConstructorUsedError; - @JsonKey(name: 'last') + @JsonKey(name: 'last_name') String get lastName => throw _privateConstructorUsedError; String get email => throw _privateConstructorUsedError; String get password => throw _privateConstructorUsedError; @@ -37,22 +37,22 @@ mixin _$UserRegistrationSheet { String get country => throw _privateConstructorUsedError; String get city => throw _privateConstructorUsedError; String get lang => throw _privateConstructorUsedError; - String get weight => throw _privateConstructorUsedError; - String get height => throw _privateConstructorUsedError; + int get weight => throw _privateConstructorUsedError; + int get height => throw _privateConstructorUsedError; @JsonKey(name: 'chest_circumference') - String get chestCircumference => throw _privateConstructorUsedError; + int get chestCircumference => throw _privateConstructorUsedError; @JsonKey(name: 'waist_circumference') - String get waistCircumference => throw _privateConstructorUsedError; + int get waistCircumference => throw _privateConstructorUsedError; @JsonKey(name: 'hip_circumference') - String get hipCircumference => throw _privateConstructorUsedError; + int get hipCircumference => throw _privateConstructorUsedError; @JsonKey(name: 'blood_pressure_up') - String get bloodPressureUp => throw _privateConstructorUsedError; + int get bloodPressureUp => throw _privateConstructorUsedError; @JsonKey(name: 'blood_pressure_down') - String get bloodPressureDown => throw _privateConstructorUsedError; + int get bloodPressureDown => throw _privateConstructorUsedError; @JsonKey(name: 'has_hypo') - String get hasHypo => throw _privateConstructorUsedError; + int get hasHypo => throw _privateConstructorUsedError; @JsonKey(name: 'has_hyper') - String get hasHyper => throw _privateConstructorUsedError; + int get hasHyper => throw _privateConstructorUsedError; @JsonKey(name: 'about_alergy') String get aboutAllergy => throw _privateConstructorUsedError; @JsonKey(name: 'about_taking_pils') @@ -66,7 +66,7 @@ mixin _$UserRegistrationSheet { @JsonKey(name: 'additional_info') String get additionalInfo => throw _privateConstructorUsedError; @JsonKey(name: 'activity_coefficient') - String get activityCoefficient => throw _privateConstructorUsedError; + double get activityCoefficient => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) @@ -83,7 +83,7 @@ abstract class $UserRegistrationSheetCopyWith<$Res> { $Res call( {String name, @JsonKey(name: 'first_name') String firstName, - @JsonKey(name: 'last') String lastName, + @JsonKey(name: 'last_name') String lastName, String email, String password, @JsonKey(name: 'password_confirmation') String passwordConfirmation, @@ -93,22 +93,22 @@ abstract class $UserRegistrationSheetCopyWith<$Res> { String country, String city, String lang, - String weight, - String height, - @JsonKey(name: 'chest_circumference') String chestCircumference, - @JsonKey(name: 'waist_circumference') String waistCircumference, - @JsonKey(name: 'hip_circumference') String hipCircumference, - @JsonKey(name: 'blood_pressure_up') String bloodPressureUp, - @JsonKey(name: 'blood_pressure_down') String bloodPressureDown, - @JsonKey(name: 'has_hypo') String hasHypo, - @JsonKey(name: 'has_hyper') String hasHyper, + int weight, + int height, + @JsonKey(name: 'chest_circumference') int chestCircumference, + @JsonKey(name: 'waist_circumference') int waistCircumference, + @JsonKey(name: 'hip_circumference') int hipCircumference, + @JsonKey(name: 'blood_pressure_up') int bloodPressureUp, + @JsonKey(name: 'blood_pressure_down') int bloodPressureDown, + @JsonKey(name: 'has_hypo') int hasHypo, + @JsonKey(name: 'has_hyper') int hasHyper, @JsonKey(name: 'about_alergy') String aboutAllergy, @JsonKey(name: 'about_taking_pils') String aboutTakingPils, @JsonKey(name: 'about_sport_hobbies') String aboutSportHobbies, @JsonKey(name: 'favorite_foods') String favoriteFoods, @JsonKey(name: 'unfavorite_foods') String unfavoriteFoods, @JsonKey(name: 'additional_info') String additionalInfo, - @JsonKey(name: 'activity_coefficient') String activityCoefficient}); + @JsonKey(name: 'activity_coefficient') double activityCoefficient}); } /// @nodoc @@ -206,39 +206,39 @@ class _$UserRegistrationSheetCopyWithImpl<$Res, weight: null == weight ? _value.weight : weight // ignore: cast_nullable_to_non_nullable - as String, + as int, height: null == height ? _value.height : height // ignore: cast_nullable_to_non_nullable - as String, + as int, chestCircumference: null == chestCircumference ? _value.chestCircumference : chestCircumference // ignore: cast_nullable_to_non_nullable - as String, + as int, waistCircumference: null == waistCircumference ? _value.waistCircumference : waistCircumference // ignore: cast_nullable_to_non_nullable - as String, + as int, hipCircumference: null == hipCircumference ? _value.hipCircumference : hipCircumference // ignore: cast_nullable_to_non_nullable - as String, + as int, bloodPressureUp: null == bloodPressureUp ? _value.bloodPressureUp : bloodPressureUp // ignore: cast_nullable_to_non_nullable - as String, + as int, bloodPressureDown: null == bloodPressureDown ? _value.bloodPressureDown : bloodPressureDown // ignore: cast_nullable_to_non_nullable - as String, + as int, hasHypo: null == hasHypo ? _value.hasHypo : hasHypo // ignore: cast_nullable_to_non_nullable - as String, + as int, hasHyper: null == hasHyper ? _value.hasHyper : hasHyper // ignore: cast_nullable_to_non_nullable - as String, + as int, aboutAllergy: null == aboutAllergy ? _value.aboutAllergy : aboutAllergy // ignore: cast_nullable_to_non_nullable @@ -266,7 +266,7 @@ class _$UserRegistrationSheetCopyWithImpl<$Res, activityCoefficient: null == activityCoefficient ? _value.activityCoefficient : activityCoefficient // ignore: cast_nullable_to_non_nullable - as String, + as double, ) as $Val); } } @@ -283,7 +283,7 @@ abstract class _$$UserRegistrationSheetImplCopyWith<$Res> $Res call( {String name, @JsonKey(name: 'first_name') String firstName, - @JsonKey(name: 'last') String lastName, + @JsonKey(name: 'last_name') String lastName, String email, String password, @JsonKey(name: 'password_confirmation') String passwordConfirmation, @@ -293,22 +293,22 @@ abstract class _$$UserRegistrationSheetImplCopyWith<$Res> String country, String city, String lang, - String weight, - String height, - @JsonKey(name: 'chest_circumference') String chestCircumference, - @JsonKey(name: 'waist_circumference') String waistCircumference, - @JsonKey(name: 'hip_circumference') String hipCircumference, - @JsonKey(name: 'blood_pressure_up') String bloodPressureUp, - @JsonKey(name: 'blood_pressure_down') String bloodPressureDown, - @JsonKey(name: 'has_hypo') String hasHypo, - @JsonKey(name: 'has_hyper') String hasHyper, + int weight, + int height, + @JsonKey(name: 'chest_circumference') int chestCircumference, + @JsonKey(name: 'waist_circumference') int waistCircumference, + @JsonKey(name: 'hip_circumference') int hipCircumference, + @JsonKey(name: 'blood_pressure_up') int bloodPressureUp, + @JsonKey(name: 'blood_pressure_down') int bloodPressureDown, + @JsonKey(name: 'has_hypo') int hasHypo, + @JsonKey(name: 'has_hyper') int hasHyper, @JsonKey(name: 'about_alergy') String aboutAllergy, @JsonKey(name: 'about_taking_pils') String aboutTakingPils, @JsonKey(name: 'about_sport_hobbies') String aboutSportHobbies, @JsonKey(name: 'favorite_foods') String favoriteFoods, @JsonKey(name: 'unfavorite_foods') String unfavoriteFoods, @JsonKey(name: 'additional_info') String additionalInfo, - @JsonKey(name: 'activity_coefficient') String activityCoefficient}); + @JsonKey(name: 'activity_coefficient') double activityCoefficient}); } /// @nodoc @@ -404,39 +404,39 @@ class __$$UserRegistrationSheetImplCopyWithImpl<$Res> weight: null == weight ? _value.weight : weight // ignore: cast_nullable_to_non_nullable - as String, + as int, height: null == height ? _value.height : height // ignore: cast_nullable_to_non_nullable - as String, + as int, chestCircumference: null == chestCircumference ? _value.chestCircumference : chestCircumference // ignore: cast_nullable_to_non_nullable - as String, + as int, waistCircumference: null == waistCircumference ? _value.waistCircumference : waistCircumference // ignore: cast_nullable_to_non_nullable - as String, + as int, hipCircumference: null == hipCircumference ? _value.hipCircumference : hipCircumference // ignore: cast_nullable_to_non_nullable - as String, + as int, bloodPressureUp: null == bloodPressureUp ? _value.bloodPressureUp : bloodPressureUp // ignore: cast_nullable_to_non_nullable - as String, + as int, bloodPressureDown: null == bloodPressureDown ? _value.bloodPressureDown : bloodPressureDown // ignore: cast_nullable_to_non_nullable - as String, + as int, hasHypo: null == hasHypo ? _value.hasHypo : hasHypo // ignore: cast_nullable_to_non_nullable - as String, + as int, hasHyper: null == hasHyper ? _value.hasHyper : hasHyper // ignore: cast_nullable_to_non_nullable - as String, + as int, aboutAllergy: null == aboutAllergy ? _value.aboutAllergy : aboutAllergy // ignore: cast_nullable_to_non_nullable @@ -464,7 +464,7 @@ class __$$UserRegistrationSheetImplCopyWithImpl<$Res> activityCoefficient: null == activityCoefficient ? _value.activityCoefficient : activityCoefficient // ignore: cast_nullable_to_non_nullable - as String, + as double, )); } } @@ -475,7 +475,7 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet { const _$UserRegistrationSheetImpl( {required this.name, @JsonKey(name: 'first_name') required this.firstName, - @JsonKey(name: 'last') required this.lastName, + @JsonKey(name: 'last_name') required this.lastName, required this.email, required this.password, @JsonKey(name: 'password_confirmation') @@ -501,7 +501,7 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet { @JsonKey(name: 'favorite_foods') required this.favoriteFoods, @JsonKey(name: 'unfavorite_foods') required this.unfavoriteFoods, @JsonKey(name: 'additional_info') required this.additionalInfo, - @JsonKey(name: 'activity_coefficient') this.activityCoefficient = '1.2'}); + @JsonKey(name: 'activity_coefficient') this.activityCoefficient = 1.2}); factory _$UserRegistrationSheetImpl.fromJson(Map json) => _$$UserRegistrationSheetImplFromJson(json); @@ -512,7 +512,7 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet { @JsonKey(name: 'first_name') final String firstName; @override - @JsonKey(name: 'last') + @JsonKey(name: 'last_name') final String lastName; @override final String email; @@ -535,30 +535,30 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet { @override final String lang; @override - final String weight; + final int weight; @override - final String height; + final int height; @override @JsonKey(name: 'chest_circumference') - final String chestCircumference; + final int chestCircumference; @override @JsonKey(name: 'waist_circumference') - final String waistCircumference; + final int waistCircumference; @override @JsonKey(name: 'hip_circumference') - final String hipCircumference; + final int hipCircumference; @override @JsonKey(name: 'blood_pressure_up') - final String bloodPressureUp; + final int bloodPressureUp; @override @JsonKey(name: 'blood_pressure_down') - final String bloodPressureDown; + final int bloodPressureDown; @override @JsonKey(name: 'has_hypo') - final String hasHypo; + final int hasHypo; @override @JsonKey(name: 'has_hyper') - final String hasHyper; + final int hasHyper; @override @JsonKey(name: 'about_alergy') final String aboutAllergy; @@ -579,7 +579,7 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet { final String additionalInfo; @override @JsonKey(name: 'activity_coefficient') - final String activityCoefficient; + final double activityCoefficient; @override String toString() { @@ -693,7 +693,7 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet { const factory _UserRegistrationSheet( {required final String name, @JsonKey(name: 'first_name') required final String firstName, - @JsonKey(name: 'last') required final String lastName, + @JsonKey(name: 'last_name') required final String lastName, required final String email, required final String password, @JsonKey(name: 'password_confirmation') @@ -704,19 +704,18 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet { required final String country, required final String city, required final String lang, - required final String weight, - required final String height, + required final int weight, + required final int height, @JsonKey(name: 'chest_circumference') - required final String chestCircumference, + required final int chestCircumference, @JsonKey(name: 'waist_circumference') - required final String waistCircumference, - @JsonKey(name: 'hip_circumference') - required final String hipCircumference, - @JsonKey(name: 'blood_pressure_up') required final String bloodPressureUp, + required final int waistCircumference, + @JsonKey(name: 'hip_circumference') required final int hipCircumference, + @JsonKey(name: 'blood_pressure_up') required final int bloodPressureUp, @JsonKey(name: 'blood_pressure_down') - required final String bloodPressureDown, - @JsonKey(name: 'has_hypo') required final String hasHypo, - @JsonKey(name: 'has_hyper') required final String hasHyper, + required final int bloodPressureDown, + @JsonKey(name: 'has_hypo') required final int hasHypo, + @JsonKey(name: 'has_hyper') required final int hasHyper, @JsonKey(name: 'about_alergy') required final String aboutAllergy, @JsonKey(name: 'about_taking_pils') required final String aboutTakingPils, @JsonKey(name: 'about_sport_hobbies') @@ -725,7 +724,7 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet { @JsonKey(name: 'unfavorite_foods') required final String unfavoriteFoods, @JsonKey(name: 'additional_info') required final String additionalInfo, @JsonKey(name: 'activity_coefficient') - final String activityCoefficient}) = _$UserRegistrationSheetImpl; + final double activityCoefficient}) = _$UserRegistrationSheetImpl; factory _UserRegistrationSheet.fromJson(Map json) = _$UserRegistrationSheetImpl.fromJson; @@ -736,7 +735,7 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet { @JsonKey(name: 'first_name') String get firstName; @override - @JsonKey(name: 'last') + @JsonKey(name: 'last_name') String get lastName; @override String get email; @@ -759,30 +758,30 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet { @override String get lang; @override - String get weight; + int get weight; @override - String get height; + int get height; @override @JsonKey(name: 'chest_circumference') - String get chestCircumference; + int get chestCircumference; @override @JsonKey(name: 'waist_circumference') - String get waistCircumference; + int get waistCircumference; @override @JsonKey(name: 'hip_circumference') - String get hipCircumference; + int get hipCircumference; @override @JsonKey(name: 'blood_pressure_up') - String get bloodPressureUp; + int get bloodPressureUp; @override @JsonKey(name: 'blood_pressure_down') - String get bloodPressureDown; + int get bloodPressureDown; @override @JsonKey(name: 'has_hypo') - String get hasHypo; + int get hasHypo; @override @JsonKey(name: 'has_hyper') - String get hasHyper; + int get hasHyper; @override @JsonKey(name: 'about_alergy') String get aboutAllergy; @@ -803,7 +802,7 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet { String get additionalInfo; @override @JsonKey(name: 'activity_coefficient') - String get activityCoefficient; + double get activityCoefficient; @override @JsonKey(ignore: true) _$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl> diff --git a/lib/data/models/userRegistrationModel/user_registration_model.g.dart b/lib/data/models/userRegistrationModel/user_registration_model.g.dart index 8eafe710..132240b7 100644 --- a/lib/data/models/userRegistrationModel/user_registration_model.g.dart +++ b/lib/data/models/userRegistrationModel/user_registration_model.g.dart @@ -11,7 +11,7 @@ _$UserRegistrationSheetImpl _$$UserRegistrationSheetImplFromJson( _$UserRegistrationSheetImpl( name: json['name'] as String, firstName: json['first_name'] as String, - lastName: json['last'] as String, + lastName: json['last_name'] as String, email: json['email'] as String, password: json['password'] as String, passwordConfirmation: json['password_confirmation'] as String, @@ -21,22 +21,23 @@ _$UserRegistrationSheetImpl _$$UserRegistrationSheetImplFromJson( country: json['country'] as String, city: json['city'] as String, lang: json['lang'] as String, - weight: json['weight'] as String, - height: json['height'] as String, - chestCircumference: json['chest_circumference'] as String, - waistCircumference: json['waist_circumference'] as String, - hipCircumference: json['hip_circumference'] as String, - bloodPressureUp: json['blood_pressure_up'] as String, - bloodPressureDown: json['blood_pressure_down'] as String, - hasHypo: json['has_hypo'] as String, - hasHyper: json['has_hyper'] as String, + weight: (json['weight'] as num).toInt(), + height: (json['height'] as num).toInt(), + chestCircumference: (json['chest_circumference'] as num).toInt(), + waistCircumference: (json['waist_circumference'] as num).toInt(), + hipCircumference: (json['hip_circumference'] as num).toInt(), + bloodPressureUp: (json['blood_pressure_up'] as num).toInt(), + bloodPressureDown: (json['blood_pressure_down'] as num).toInt(), + hasHypo: (json['has_hypo'] as num).toInt(), + hasHyper: (json['has_hyper'] as num).toInt(), aboutAllergy: json['about_alergy'] as String, aboutTakingPils: json['about_taking_pils'] as String, aboutSportHobbies: json['about_sport_hobbies'] as String, favoriteFoods: json['favorite_foods'] as String, unfavoriteFoods: json['unfavorite_foods'] as String, additionalInfo: json['additional_info'] as String, - activityCoefficient: json['activity_coefficient'] as String? ?? '1.2', + activityCoefficient: + (json['activity_coefficient'] as num?)?.toDouble() ?? 1.2, ); Map _$$UserRegistrationSheetImplToJson( @@ -44,7 +45,7 @@ Map _$$UserRegistrationSheetImplToJson( { 'name': instance.name, 'first_name': instance.firstName, - 'last': instance.lastName, + 'last_name': instance.lastName, 'email': instance.email, 'password': instance.password, 'password_confirmation': instance.passwordConfirmation, diff --git a/lib/presentation/registration/city_of_living_screen/city_of_living_screen.dart b/lib/features/registration/consts/cities_list.dart similarity index 79% rename from lib/presentation/registration/city_of_living_screen/city_of_living_screen.dart rename to lib/features/registration/consts/cities_list.dart index 1e5f01be..728024d5 100644 --- a/lib/presentation/registration/city_of_living_screen/city_of_living_screen.dart +++ b/lib/features/registration/consts/cities_list.dart @@ -1,159 +1,4 @@ -import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart'; -import 'package:go_router/go_router.dart'; - -import 'bloc/city_of_living_bloc.dart'; -import 'models/city_of_living_model.dart'; -import 'package:eatvio_app/core/app_export.dart'; -import 'package:eatvio_app/widgets/custom_drop_down.dart'; -import 'package:eatvio_app/widgets/custom_text_form_field.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; -import 'package:flutter/material.dart'; - -class CityOfLivingScreen extends StatefulWidget { - final UserRegistrationSheet sheet; - - const CityOfLivingScreen({super.key, required this.sheet}); - - @override - State createState() => _CityOfLivingScreenState(); -} - -class _CityOfLivingScreenState extends State { - @override - Widget build(BuildContext context) { - return BlocProvider( - create: (BuildContext context) => - CityOfLivingBloc(CityOfLivingState(cityOfLivingModelObj: CityOfLivingModel(userRegistrationSheet: widget.sheet)))..add(CityOfLivingInitialEvent()), - child: SingleChildScrollView( - padding: EdgeInsets.only(bottom: 80), - child: Container( - width: double.maxFinite, - padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 9.v), - child: Column( - children: [ - Text("place_of_living".tr, style: theme.textTheme.headlineSmall), - SizedBox(height: 39.v), - Text("country".tr, style: theme.textTheme.bodyLarge), - SizedBox(height: 2.v), - BlocSelector( - selector: (state) => state.cityOfLivingModelObj, - builder: (context, cityOfLivingModelObj) { - return CustomDropDown( - icon: Container( - margin: EdgeInsets.fromLTRB(30.h, 11.v, 17.h, 11.v), - decoration: BoxDecoration(borderRadius: BorderRadius.circular(1.h)), - child: CustomImageView(imagePath: ImageConstant.imgFavorite, height: 12.adaptSize, width: 12.adaptSize), - ), - hintText: "Не выбрано".tr, - items: cityOfLivingModelObj?.dropdownItemList ?? [], - onChanged: onDropDownChange(context), - ); - }, - ), - SizedBox(height: 22.v), - Text("Населенный пункт", style: theme.textTheme.bodyLarge), - SizedBox(height: 2.v), - BlocBuilder( - builder: (context, state) { - return RawAutocomplete( - optionsBuilder: (TextEditingValue textEditingValue) => _options.where((String option) { - return option.toLowerCase().startsWith(textEditingValue.text.toLowerCase()); - }), - fieldViewBuilder: ( - BuildContext context, - TextEditingController textEditingController, - FocusNode focusNode, - VoidCallback onFieldSubmitted, - ) { - return CustomTextFormField( - controller: textEditingController, - focusNode: focusNode, - onFieldSubmitted: (String value) => onFieldSubmitted(), - ); - }, - optionsViewBuilder: ( - BuildContext context, - AutocompleteOnSelected onSelected, - Iterable options, - ) { - return Align( - alignment: Alignment.topLeft, - child: Material( - elevation: 4.0, - child: SizedBox( - height: 200.0, - child: ListView.builder( - padding: const EdgeInsets.all(8.0), - itemCount: options.length, - itemBuilder: (BuildContext context, int index) { - final String option = options.elementAt(index); - return GestureDetector( - onTap: () => onSelected(option), - child: ListTile( - title: Text(option), - ), - ); - }, - ), - ), - ), - ); - }, - ); - }, - ), - ], - ), - ), - ), - ); - } - - onTapContinue(CityOfLivingState state, BuildContext context) { - return () { - UserRegistrationSheet sheet = state.cityOfLivingModelObj!.userRegistrationSheet; - GoRouter.of(context).goNamed('bodyCircumferencesScreen', extra: sheet); - }; - } - - onDropDownChange(BuildContext context) { - return (value) { - context.read().add(ChangeDropDownEvent(value: value)); - final registrationCubit = context.read(); - registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(country: value)); - }; - } - - Function onTapBack(BuildContext context) { - return () { - onTapArrowLeft(context); - }; - } - - /// Navigates to the previous screen. - onTapArrowLeft(BuildContext context) { - GoRouter.of(context).pop(); - } -} - -selectProduct(AutocompleteOnSelected onSelected, String option, CityOfLivingState state, BuildContext context) { - state.cityController?.text = option; - final registrationCubit = context.read(); - registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(city: option)); - return () { - onSelected(option); - }; -} - -buildOptions(List _options) { - return (TextEditingValue textEditingValue) { - return _options.where((String option) { - return true; - }); - }; -} - -const List _options = const [ +const List citiesList = const [ "Абаза", "Абакан", "Абдулино", @@ -1271,4 +1116,4 @@ const List _options = const [ "Ясногорск", "Ясный", "Яхрома", -]; +]; \ No newline at end of file diff --git a/lib/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart b/lib/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart index e882eadd..c39f8342 100644 --- a/lib/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart +++ b/lib/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart @@ -2,12 +2,43 @@ import 'package:eatvio_app/core/app_export.dart'; import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_state.dart'; import 'package:eatvio_app/features/registration/repositories/registration_repository.dart'; -import 'package:eatvio_app/presentation/registration/language_select_screen/models/language_select_model.dart'; class RegistrationCubit extends Cubit { final RegistrationRepository registrationRepository; - RegistrationCubit({required this.registrationRepository}) : super(RegistrationState(sheet: LanguageSelectModel().userRegistrationSheet)); + RegistrationCubit({required this.registrationRepository}) + : super( + RegistrationState( + sheet: UserRegistrationSheet( + name: '', + firstName: '', + lastName: '', + email: '', + password: '', + passwordConfirmation: '', + birthdate: DateTime.now().toString(), + gender: '', + country: '', + city: '', + lang: 'Русский', + weight: 0, + height: 0, + chestCircumference: 0, + waistCircumference: 0, + hipCircumference: 0, + bloodPressureUp: 0, + bloodPressureDown: 0, + hasHypo: 0, + hasHyper: 0, + aboutAllergy: '', + aboutTakingPils: '', + aboutSportHobbies: '', + favoriteFoods: '', + unfavoriteFoods: '', + additionalInfo: '', + ), + ), + ); updateSheet(UserRegistrationSheet sheet) => emit(RegistrationState(sheet: sheet)); diff --git a/lib/presentation/registration/additional_information_screen/additional_information_screen.dart b/lib/features/registration/presentation/pages/additional_information_screen.dart similarity index 100% rename from lib/presentation/registration/additional_information_screen/additional_information_screen.dart rename to lib/features/registration/presentation/pages/additional_information_screen.dart diff --git a/lib/presentation/registration/allergies_screen/allergies_screen.dart b/lib/features/registration/presentation/pages/allergies_screen.dart similarity index 100% rename from lib/presentation/registration/allergies_screen/allergies_screen.dart rename to lib/features/registration/presentation/pages/allergies_screen.dart diff --git a/lib/presentation/registration/blood_pressure_screen/blood_pressure_screen.dart b/lib/features/registration/presentation/pages/blood_pressure_screen.dart similarity index 89% rename from lib/presentation/registration/blood_pressure_screen/blood_pressure_screen.dart rename to lib/features/registration/presentation/pages/blood_pressure_screen.dart index 35669330..c4236663 100644 --- a/lib/presentation/registration/blood_pressure_screen/blood_pressure_screen.dart +++ b/lib/features/registration/presentation/pages/blood_pressure_screen.dart @@ -22,7 +22,7 @@ class _BloodPressureScreenState extends State { title: "Да", ), SelectionPopupModel( - id: 2, + id: 0, title: "Нет", ), ]; @@ -39,14 +39,10 @@ class _BloodPressureScreenState extends State { super.initState(); selectedPopupHypo = selectionPopupList[1]; selectedPopupHyper = selectionPopupList[1]; - upPressureController.text = widget.sheet.bloodPressureUp; - downPressureController.text = widget.sheet.bloodPressureDown; - if (widget.sheet.hasHyper.isNotEmpty) { - widget.sheet.hasHyper == 'Да' ? selectedPopupHyper = selectionPopupList[0] : selectedPopupHyper = selectionPopupList[1]; - } - if (widget.sheet.hasHypo.isNotEmpty) { - widget.sheet.hasHypo == 'Да' ? selectedPopupHypo = selectionPopupList[0] : selectedPopupHypo = selectionPopupList[1]; - } + upPressureController.text = widget.sheet.bloodPressureUp.toString(); + downPressureController.text = widget.sheet.bloodPressureDown.toString(); + widget.sheet.hasHyper == '1' ? selectedPopupHyper = selectionPopupList[0] : selectedPopupHyper = selectionPopupList[1]; + widget.sheet.hasHypo == '1' ? selectedPopupHypo = selectionPopupList[0] : selectedPopupHypo = selectionPopupList[1]; } @override @@ -82,7 +78,7 @@ class _BloodPressureScreenState extends State { hintText: "90".tr, onChanged: (newValue) { final registrationCubit = context.read(); - registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(bloodPressureUp: newValue)); + registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(bloodPressureUp: int.parse(newValue))); }, ), ], @@ -102,7 +98,7 @@ class _BloodPressureScreenState extends State { hintText: "90".tr, onChanged: (newValue) { final registrationCubit = context.read(); - registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(bloodPressureDown: newValue)); + registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(bloodPressureDown: int.parse(newValue))); }, ), ], @@ -126,7 +122,7 @@ class _BloodPressureScreenState extends State { setState(() { selectedPopupHypo = newPopup; final registrationCubit = context.read(); - registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(hasHypo: selectedPopupHypo.title)); + registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(hasHypo: selectedPopupHypo.id!)); }); }, ), @@ -149,7 +145,7 @@ class _BloodPressureScreenState extends State { setState(() { selectedPopupHyper = newPopup; final registrationCubit = context.read(); - registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(hasHyper: selectedPopupHyper.title)); + registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(hasHyper: selectedPopupHyper.id!)); }); }, ), diff --git a/lib/presentation/registration/body_circumferences_screen/body_circumferences_screen.dart b/lib/features/registration/presentation/pages/body_circumferences_screen.dart similarity index 85% rename from lib/presentation/registration/body_circumferences_screen/body_circumferences_screen.dart rename to lib/features/registration/presentation/pages/body_circumferences_screen.dart index 60576c8e..06417c80 100644 --- a/lib/presentation/registration/body_circumferences_screen/body_circumferences_screen.dart +++ b/lib/features/registration/presentation/pages/body_circumferences_screen.dart @@ -24,9 +24,9 @@ class _BodyCircumferencesScreenState extends State { @override void initState() { super.initState(); - chestCircumferenceController.text = widget.sheet.chestCircumference; - waistCircumferenceController.text = widget.sheet.waistCircumference; - hipCircumferenceController.text = widget.sheet.hipCircumference; + if (widget.sheet.chestCircumference != 0) chestCircumferenceController.text = widget.sheet.chestCircumference.toString(); + if (widget.sheet.waistCircumference != 0) waistCircumferenceController.text = widget.sheet.waistCircumference.toString(); + if (widget.sheet.hipCircumference != 0) hipCircumferenceController.text = widget.sheet.hipCircumference.toString(); } @override @@ -50,7 +50,7 @@ class _BodyCircumferencesScreenState extends State { hintText: "90".tr, onChanged: (value) { final registrationCubit = context.read(); - registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(chestCircumference: value)); + registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(chestCircumference: int.parse(value))); }, ), ], @@ -64,7 +64,7 @@ class _BodyCircumferencesScreenState extends State { hintText: "60".tr, onChanged: (value) { final registrationCubit = context.read(); - registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(waistCircumference: value)); + registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(waistCircumference: int.parse(value))); }, ), SizedBox(height: 21.v), @@ -77,7 +77,7 @@ class _BodyCircumferencesScreenState extends State { textInputAction: TextInputAction.done, onChanged: (value) { final registrationCubit = context.read(); - registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(hipCircumference: value)); + registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(hipCircumference: int.parse(value))); }, ), ], diff --git a/lib/features/registration/presentation/pages/city_of_living_screen.dart b/lib/features/registration/presentation/pages/city_of_living_screen.dart new file mode 100644 index 00000000..b183ec98 --- /dev/null +++ b/lib/features/registration/presentation/pages/city_of_living_screen.dart @@ -0,0 +1,88 @@ +import 'package:eatvio_app/features/registration/consts/cities_list.dart'; +import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart'; +import 'package:eatvio_app/core/app_export.dart'; +import 'package:eatvio_app/widgets/custom_drop_down.dart'; +import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_typeahead/flutter_typeahead.dart'; + +class CityOfLivingScreen extends StatefulWidget { + final UserRegistrationSheet sheet; + + const CityOfLivingScreen({super.key, required this.sheet}); + + @override + State createState() => _CityOfLivingScreenState(); +} + +class _CityOfLivingScreenState extends State { + final dropdownItemList = [ + SelectionPopupModel(id: 1, title: "Россия", isSelected: true), + ]; + + late SelectionPopupModel selectedItem; + final cityController = TextEditingController(); + + @override + void initState() { + super.initState(); + selectedItem = dropdownItemList[0]; + final registrationCubit = context.read(); + registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(country: selectedItem.title)); + } + + @override + Widget build(BuildContext context) { + return SingleChildScrollView( + padding: EdgeInsets.only(bottom: 80), + child: Container( + width: double.maxFinite, + padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 9.v), + child: Column( + children: [ + Text("place_of_living".tr, style: theme.textTheme.headlineSmall), + SizedBox(height: 39.v), + Text("country".tr, style: theme.textTheme.bodyLarge), + SizedBox(height: 2.v), + CustomDropDown( + icon: Container( + margin: EdgeInsets.fromLTRB(30.h, 11.v, 17.h, 11.v), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(1.h)), + child: CustomImageView(imagePath: ImageConstant.imgFavorite, height: 12.adaptSize, width: 12.adaptSize), + ), + hintText: "Не выбрано".tr, + items: dropdownItemList, + value: selectedItem, + onChanged: (newValue) { + setState(() { + selectedItem = newValue; + }); + final registrationCubit = context.read(); + registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(country: newValue.title)); + }, + ), + SizedBox(height: 22.v), + Text("Населенный пункт", style: theme.textTheme.bodyLarge), + SizedBox(height: 2.v), + TypeAheadField( + controller: cityController, + itemBuilder: (BuildContext context, String item) { + return Text(item); + }, + onSelected: (item) { + setState(() { + cityController.text = item; + }); + final registrationCubit = context.read(); + registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(city: item)); + }, + suggestionsCallback: (query) { + return citiesList.where((country) => country.toLowerCase().contains(query.toLowerCase())).toList(); + }, + ), + ], + ), + ), + ); + } +} diff --git a/lib/presentation/registration/credentials_screen/credentials_screen.dart b/lib/features/registration/presentation/pages/credentials_screen.dart similarity index 100% rename from lib/presentation/registration/credentials_screen/credentials_screen.dart rename to lib/features/registration/presentation/pages/credentials_screen.dart diff --git a/lib/presentation/registration/date_of_birth_screen/date_of_birth_screen.dart b/lib/features/registration/presentation/pages/date_of_birth_screen.dart similarity index 100% rename from lib/presentation/registration/date_of_birth_screen/date_of_birth_screen.dart rename to lib/features/registration/presentation/pages/date_of_birth_screen.dart diff --git a/lib/presentation/registration/favorite_foods_screen/favorite_foods_screen.dart b/lib/features/registration/presentation/pages/favorite_foods_screen.dart similarity index 100% rename from lib/presentation/registration/favorite_foods_screen/favorite_foods_screen.dart rename to lib/features/registration/presentation/pages/favorite_foods_screen.dart diff --git a/lib/presentation/registration/favorite_sports_screen/favorite_sports_screen.dart b/lib/features/registration/presentation/pages/favorite_sports_screen.dart similarity index 100% rename from lib/presentation/registration/favorite_sports_screen/favorite_sports_screen.dart rename to lib/features/registration/presentation/pages/favorite_sports_screen.dart diff --git a/lib/presentation/registration/gender_screen/gender_screen.dart b/lib/features/registration/presentation/pages/gender_screen.dart similarity index 100% rename from lib/presentation/registration/gender_screen/gender_screen.dart rename to lib/features/registration/presentation/pages/gender_screen.dart diff --git a/lib/presentation/registration/height_screen/height_screen.dart b/lib/features/registration/presentation/pages/height_screen.dart similarity index 93% rename from lib/presentation/registration/height_screen/height_screen.dart rename to lib/features/registration/presentation/pages/height_screen.dart index 9936418e..a2f47e0e 100644 --- a/lib/presentation/registration/height_screen/height_screen.dart +++ b/lib/features/registration/presentation/pages/height_screen.dart @@ -20,7 +20,7 @@ class _HeightScreenState extends State { @override void initState() { super.initState(); - heightController.text = widget.sheet.height; + if (widget.sheet.height != 0) heightController.text = widget.sheet.height.toString(); } @override @@ -54,7 +54,7 @@ class _HeightScreenState extends State { ], onChanged: (newValue) { final registrationCubit = context.read(); - registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(height: newValue)); + registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(height: int.parse(newValue))); }, ), ], diff --git a/lib/presentation/registration/language_select_screen/language_select_screen.dart b/lib/features/registration/presentation/pages/language_select_screen.dart similarity index 100% rename from lib/presentation/registration/language_select_screen/language_select_screen.dart rename to lib/features/registration/presentation/pages/language_select_screen.dart diff --git a/lib/presentation/registration/medicine_intake_screen/medicine_intake_screen.dart b/lib/features/registration/presentation/pages/medicine_intake_screen.dart similarity index 100% rename from lib/presentation/registration/medicine_intake_screen/medicine_intake_screen.dart rename to lib/features/registration/presentation/pages/medicine_intake_screen.dart diff --git a/lib/presentation/registration/name_screen/name_screen.dart b/lib/features/registration/presentation/pages/name_screen.dart similarity index 100% rename from lib/presentation/registration/name_screen/name_screen.dart rename to lib/features/registration/presentation/pages/name_screen.dart diff --git a/lib/features/registration/presentation/pages/registration_screen.dart b/lib/features/registration/presentation/pages/registration_screen.dart index 074d67f8..30eb7591 100644 --- a/lib/features/registration/presentation/pages/registration_screen.dart +++ b/lib/features/registration/presentation/pages/registration_screen.dart @@ -1,22 +1,22 @@ import 'package:eatvio_app/core/app_export.dart'; import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart'; import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_state.dart'; +import 'package:eatvio_app/features/registration/presentation/pages/allergies_screen.dart'; +import 'package:eatvio_app/features/registration/presentation/pages/city_of_living_screen.dart'; +import 'package:eatvio_app/features/registration/presentation/pages/favorite_foods_screen.dart'; +import 'package:eatvio_app/features/registration/presentation/pages/height_screen.dart'; +import 'package:eatvio_app/features/registration/presentation/pages/name_screen.dart'; import 'package:eatvio_app/locator_service.dart'; -import 'package:eatvio_app/presentation/registration/additional_information_screen/additional_information_screen.dart'; -import 'package:eatvio_app/presentation/registration/allergies_screen/allergies_screen.dart'; -import 'package:eatvio_app/presentation/registration/blood_pressure_screen/blood_pressure_screen.dart'; -import 'package:eatvio_app/presentation/registration/body_circumferences_screen/body_circumferences_screen.dart'; -import 'package:eatvio_app/presentation/registration/city_of_living_screen/city_of_living_screen.dart'; -import 'package:eatvio_app/presentation/registration/credentials_screen/credentials_screen.dart'; -import 'package:eatvio_app/presentation/registration/date_of_birth_screen/date_of_birth_screen.dart'; -import 'package:eatvio_app/presentation/registration/favorite_foods_screen/favorite_foods_screen.dart'; -import 'package:eatvio_app/presentation/registration/favorite_sports_screen/favorite_sports_screen.dart'; -import 'package:eatvio_app/presentation/registration/gender_screen/gender_screen.dart'; -import 'package:eatvio_app/presentation/registration/height_screen/height_screen.dart'; -import 'package:eatvio_app/presentation/registration/language_select_screen/language_select_screen.dart'; -import 'package:eatvio_app/presentation/registration/medicine_intake_screen/medicine_intake_screen.dart'; -import 'package:eatvio_app/presentation/registration/name_screen/name_screen.dart'; -import 'package:eatvio_app/presentation/registration/weight_screen/weight_screen.dart'; +import 'package:eatvio_app/features/registration/presentation/pages/additional_information_screen.dart'; +import 'package:eatvio_app/features/registration/presentation/pages/blood_pressure_screen.dart'; +import 'package:eatvio_app/features/registration/presentation/pages/body_circumferences_screen.dart'; +import 'package:eatvio_app/features/registration/presentation/pages/credentials_screen.dart'; +import 'package:eatvio_app/features/registration/presentation/pages/date_of_birth_screen.dart'; +import 'package:eatvio_app/features/registration/presentation/pages/favorite_sports_screen.dart'; +import 'package:eatvio_app/features/registration/presentation/pages/gender_screen.dart'; +import 'package:eatvio_app/features/registration/presentation/pages/language_select_screen.dart'; +import 'package:eatvio_app/features/registration/presentation/pages/medicine_intake_screen.dart'; +import 'package:eatvio_app/features/registration/presentation/pages/weight_screen.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -34,6 +34,7 @@ class _RegistrationScreenState extends State { double progressValue = 1 / 15; int step = 1; final pageController = PageController(); + final RegistrationCubit registrationCubit = sl(); _showPopDialog() { showDialog( @@ -63,7 +64,7 @@ class _RegistrationScreenState extends State { @override Widget build(BuildContext context) { return BlocProvider( - create: (BuildContext context) => sl(), + create: (BuildContext context) => registrationCubit, child: BlocBuilder( builder: (BuildContext context, RegistrationState state) { return PopScope( @@ -225,7 +226,10 @@ class _RegistrationScreenState extends State { return false; } case 3: - List errors = validateNameFields(state.sheet.firstName, state.sheet.lastName); + List errors = validateNameFields( + state.sheet.firstName.toString(), + state.sheet.lastName.toString(), + ); if (errors.isEmpty) { return true; } else { @@ -251,7 +255,11 @@ class _RegistrationScreenState extends State { return false; } case 7: - List errors = validateCircumferencesFields(state.sheet.chestCircumference, state.sheet.waistCircumference, state.sheet.hipCircumference); + List errors = validateCircumferencesFields( + state.sheet.chestCircumference.toString(), + state.sheet.waistCircumference.toString(), + state.sheet.hipCircumference.toString(), + ); if (errors.isEmpty) { return true; } else { @@ -277,7 +285,7 @@ class _RegistrationScreenState extends State { return false; } case 15: - context.read().tryRegistration(); + registrationCubit.tryRegistration(); return true; default: return true; diff --git a/lib/presentation/registration/weight_screen/weight_screen.dart b/lib/features/registration/presentation/pages/weight_screen.dart similarity index 93% rename from lib/presentation/registration/weight_screen/weight_screen.dart rename to lib/features/registration/presentation/pages/weight_screen.dart index a8a59ca2..6c64ad1f 100644 --- a/lib/presentation/registration/weight_screen/weight_screen.dart +++ b/lib/features/registration/presentation/pages/weight_screen.dart @@ -20,7 +20,7 @@ class _WeightScreenState extends State { @override void initState() { super.initState(); - weightController.text = widget.sheet.weight; + if (widget.sheet.weight != 0) weightController.text = widget.sheet.weight.toString(); } @override @@ -54,7 +54,7 @@ class _WeightScreenState extends State { ], onChanged: (newValue) { final registrationCubit = context.read(); - registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(weight: newValue)); + registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(weight: int.parse(newValue))); }, ), ], diff --git a/lib/features/registration/repositories/registration_repository.dart b/lib/features/registration/repositories/registration_repository.dart index bbaf43f3..86420946 100644 --- a/lib/features/registration/repositories/registration_repository.dart +++ b/lib/features/registration/repositories/registration_repository.dart @@ -8,9 +8,9 @@ class RegistrationRepository { tryRegister(UserRegistrationSheet sheet) async { try { - return await registrationService.register(sheet: sheet); + return await registrationService.register(sheet: sheet.copyWith(country: 'Россия', city: 'Москва').toJson()); } catch (e) { rethrow; } } -} \ No newline at end of file +} diff --git a/lib/features/registration/services/registration_service.dart b/lib/features/registration/services/registration_service.dart index f7c41ecb..9ff81080 100644 --- a/lib/features/registration/services/registration_service.dart +++ b/lib/features/registration/services/registration_service.dart @@ -1,5 +1,4 @@ import 'package:dio/dio.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; import 'package:retrofit/retrofit.dart'; part 'registration_service.g.dart'; @@ -10,6 +9,6 @@ abstract class RegistrationService { @POST('/register') Future register({ - @Body() required UserRegistrationSheet sheet, + @Body() required Map sheet, }); } diff --git a/lib/features/registration/services/registration_service.g.dart b/lib/features/registration/services/registration_service.g.dart index 44140792..0a7fc8f5 100644 --- a/lib/features/registration/services/registration_service.g.dart +++ b/lib/features/registration/services/registration_service.g.dart @@ -19,11 +19,12 @@ class _RegistrationService implements RegistrationService { String? baseUrl; @override - Future register({required UserRegistrationSheet sheet}) async { + Future register({required Map sheet}) async { final _extra = {}; final queryParameters = {}; final _headers = {}; - final _data = sheet; + final _data = {}; + _data.addAll(sheet); await _dio.fetch(_setStreamType(Options( method: 'POST', headers: _headers, diff --git a/lib/presentation/auth/auth_screen/auth_screen.dart b/lib/presentation/auth/auth_screen/auth_screen.dart index c2990137..ad32b70f 100644 --- a/lib/presentation/auth/auth_screen/auth_screen.dart +++ b/lib/presentation/auth/auth_screen/auth_screen.dart @@ -1,5 +1,6 @@ import 'package:eatvio_app/core/token_storage.dart'; import 'package:go_router/go_router.dart'; +import 'package:url_launcher/url_launcher.dart'; import 'bloc/auth_bloc.dart'; import 'models/auth_model.dart'; @@ -33,43 +34,46 @@ class AuthScreen extends StatelessWidget { Widget build(BuildContext context) { mediaQueryData = MediaQuery.of(context); return Scaffold( - resizeToAvoidBottomInset: false, - appBar: _buildAppBar(context), - body: GestureDetector( - onTap: () => FocusScope.of(context).unfocus(), - child: Container( - width: double.maxFinite, - padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 9.v), - child: Column(children: [ - SizedBox(height: 36.v), - Text("user_authorization".tr, style: theme.textTheme.headlineSmall), - SizedBox(height: 60.v), - Text("email".tr, style: theme.textTheme.bodyLarge), - SizedBox(height: 3.v), - BlocSelector( - selector: (state) => state.emailController, - builder: (context, emailController) { - return CustomTextFormField(controller: emailController, textInputAction: TextInputAction.done); - },), - SizedBox(height: 22.v), - Text("password".tr, style: theme.textTheme.bodyLarge), - SizedBox(height: 5.v), - BlocSelector( - selector: (state) => state.passwordController, - builder: (context, passwordController) { - return CustomTextFormField( - obscureText: true, - controller: passwordController, - ); - },), - SizedBox(height: 50.v), - NextStepButton( - text: "no_account".tr.toUpperCase(), - margin: EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v), - buttonStyle: CustomButtonStyles.outlinePrimaryTL15, - onPressed: onTapNoAccount(context), - ), - /*NextStepButton( + resizeToAvoidBottomInset: false, + appBar: _buildAppBar(context), + body: GestureDetector( + onTap: () => FocusScope.of(context).unfocus(), + child: Container( + width: double.maxFinite, + padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 9.v), + child: Column( + children: [ + SizedBox(height: 36.v), + Text("user_authorization".tr, style: theme.textTheme.headlineSmall), + SizedBox(height: 60.v), + Text("email".tr, style: theme.textTheme.bodyLarge), + SizedBox(height: 3.v), + BlocSelector( + selector: (state) => state.emailController, + builder: (context, emailController) { + return CustomTextFormField(controller: emailController, textInputAction: TextInputAction.done); + }, + ), + SizedBox(height: 22.v), + Text("password".tr, style: theme.textTheme.bodyLarge), + SizedBox(height: 5.v), + BlocSelector( + selector: (state) => state.passwordController, + builder: (context, passwordController) { + return CustomTextFormField( + obscureText: true, + controller: passwordController, + ); + }, + ), + SizedBox(height: 50.v), + NextStepButton( + text: "no_account".tr.toUpperCase(), + margin: EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v), + buttonStyle: CustomButtonStyles.outlinePrimaryTL15, + onPressed: onTapNoAccount(context), + ), + /*NextStepButton( text: "Тест дневника".toUpperCase(), margin: EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v), @@ -81,14 +85,27 @@ class AuthScreen extends StatelessWidget { EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v), buttonStyle: CustomButtonStyles.outlinePrimaryTL15, onPressed: onTapProfileTest(context)),*/ - BlocBuilder(builder: (context, state) { - return NextStepButton( - text: "authentificate".tr.toUpperCase(), - margin: EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v), - buttonStyle: CustomButtonStyles.outlinePrimaryTL15, - onPressed: onTapAuth(state, context),); - },), - ],),),),); + BlocBuilder( + builder: (context, state) { + return NextStepButton( + text: "authentificate".tr.toUpperCase(), + margin: EdgeInsets.only(left: 16.h, right: 16.h, bottom: 16.v), + buttonStyle: CustomButtonStyles.outlinePrimaryTL15, + onPressed: onTapAuth(state, context), + ); + }, + ), + TextButton( + onPressed: () async { + await launchUrl(Uri.parse(dotenv.env['OFERTA']!)); + }, + child: Text('Пользовательское соглашение'), + ), + ], + ), + ), + ), + ); } onTapAuth(AuthState state, BuildContext context) { @@ -99,8 +116,12 @@ class AuthScreen extends StatelessWidget { 'email': state.emailController!.text, 'password': state.passwordController!.text, }; - final response = await http.post(Uri.parse(dotenv.env['SERVER_ROOT']! + '/login'), - headers: {'Content-Type': 'application/json'}, body: json.encode(credentials), encoding: utf8,); + final response = await http.post( + Uri.parse(dotenv.env['SERVER_ROOT']! + '/login'), + headers: {'Content-Type': 'application/json'}, + body: json.encode(credentials), + encoding: utf8, + ); print(response.statusCode); if (response.statusCode == 200) { var res = await jsonDecode(response.body); diff --git a/lib/presentation/registration/additional_information_screen/bloc/additional_information_bloc.dart b/lib/presentation/registration/additional_information_screen/bloc/additional_information_bloc.dart deleted file mode 100644 index b2405c57..00000000 --- a/lib/presentation/registration/additional_information_screen/bloc/additional_information_bloc.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/additional_information_screen/models/additional_information_model.dart'; -part 'additional_information_event.dart'; -part 'additional_information_state.dart'; - -/// A bloc that manages the state of a AdditionalInformation according to the event that is dispatched to it. -class AdditionalInformationBloc - extends Bloc { - AdditionalInformationBloc(AdditionalInformationState initialState) - : super(initialState) { - on(_onInitialize); - } - - _onInitialize( - AdditionalInformationInitialEvent event, - Emitter emit, - ) async { - emit(state.copyWith(editTextController: TextEditingController())); - } -} diff --git a/lib/presentation/registration/additional_information_screen/bloc/additional_information_event.dart b/lib/presentation/registration/additional_information_screen/bloc/additional_information_event.dart deleted file mode 100644 index 71494f83..00000000 --- a/lib/presentation/registration/additional_information_screen/bloc/additional_information_event.dart +++ /dev/null @@ -1,16 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'additional_information_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///AdditionalInformation widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class AdditionalInformationEvent extends Equatable {} - -/// Event that is dispatched when the AdditionalInformation widget is first created. -class AdditionalInformationInitialEvent extends AdditionalInformationEvent { - @override - List get props => []; -} diff --git a/lib/presentation/registration/additional_information_screen/bloc/additional_information_state.dart b/lib/presentation/registration/additional_information_screen/bloc/additional_information_state.dart deleted file mode 100644 index 08dd10c4..00000000 --- a/lib/presentation/registration/additional_information_screen/bloc/additional_information_state.dart +++ /dev/null @@ -1,31 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'additional_information_bloc.dart'; - -/// Represents the state of AdditionalInformation in the application. -class AdditionalInformationState extends Equatable { - AdditionalInformationState({ - this.editTextController, - this.additionalInformationModelObj, - }); - - TextEditingController? editTextController; - - AdditionalInformationModel? additionalInformationModelObj; - - @override - List get props => [ - editTextController, - additionalInformationModelObj, - ]; - AdditionalInformationState copyWith({ - TextEditingController? editTextController, - AdditionalInformationModel? additionalInformationModelObj, - }) { - return AdditionalInformationState( - editTextController: editTextController ?? this.editTextController, - additionalInformationModelObj: - additionalInformationModelObj ?? this.additionalInformationModelObj, - ); - } -} diff --git a/lib/presentation/registration/additional_information_screen/models/additional_information_model.dart b/lib/presentation/registration/additional_information_screen/models/additional_information_model.dart deleted file mode 100644 index ff001d96..00000000 --- a/lib/presentation/registration/additional_information_screen/models/additional_information_model.dart +++ /dev/null @@ -1,20 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; - -/// This class defines the variables used in the [additional_information_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class AdditionalInformationModel extends Equatable { - UserRegistrationSheet userRegistrationSheet; - AdditionalInformationModel({required this.userRegistrationSheet}); - - AdditionalInformationModel copyWith() { - return AdditionalInformationModel( - userRegistrationSheet: userRegistrationSheet, - ); - } - - @override - List get props => [userRegistrationSheet]; -} diff --git a/lib/presentation/registration/allergies_screen/bloc/allergies_bloc.dart b/lib/presentation/registration/allergies_screen/bloc/allergies_bloc.dart deleted file mode 100644 index f4cf7a22..00000000 --- a/lib/presentation/registration/allergies_screen/bloc/allergies_bloc.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/allergies_screen/models/allergies_model.dart'; -part 'allergies_event.dart'; -part 'allergies_state.dart'; - -/// A bloc that manages the state of a Allergies according to the event that is dispatched to it. -class AllergiesBloc extends Bloc { - AllergiesBloc(AllergiesState initialState) : super(initialState) { - on(_onInitialize); - } - - _onInitialize( - AllergiesInitialEvent event, - Emitter emit, - ) async { - emit(state.copyWith(enterInformationController: TextEditingController())); - } -} diff --git a/lib/presentation/registration/allergies_screen/bloc/allergies_event.dart b/lib/presentation/registration/allergies_screen/bloc/allergies_event.dart deleted file mode 100644 index 8892cc35..00000000 --- a/lib/presentation/registration/allergies_screen/bloc/allergies_event.dart +++ /dev/null @@ -1,16 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'allergies_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///Allergies widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class AllergiesEvent extends Equatable {} - -/// Event that is dispatched when the Allergies widget is first created. -class AllergiesInitialEvent extends AllergiesEvent { - @override - List get props => []; -} diff --git a/lib/presentation/registration/allergies_screen/bloc/allergies_state.dart b/lib/presentation/registration/allergies_screen/bloc/allergies_state.dart deleted file mode 100644 index a63c52d8..00000000 --- a/lib/presentation/registration/allergies_screen/bloc/allergies_state.dart +++ /dev/null @@ -1,31 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'allergies_bloc.dart'; - -/// Represents the state of Allergies in the application. -class AllergiesState extends Equatable { - AllergiesState({ - this.enterInformationController, - this.allergiesModelObj, - }); - - TextEditingController? enterInformationController; - - AllergiesModel? allergiesModelObj; - - @override - List get props => [ - enterInformationController, - allergiesModelObj, - ]; - AllergiesState copyWith({ - TextEditingController? enterInformationController, - AllergiesModel? allergiesModelObj, - }) { - return AllergiesState( - enterInformationController: - enterInformationController ?? this.enterInformationController, - allergiesModelObj: allergiesModelObj ?? this.allergiesModelObj, - ); - } -} diff --git a/lib/presentation/registration/allergies_screen/models/allergies_model.dart b/lib/presentation/registration/allergies_screen/models/allergies_model.dart deleted file mode 100644 index ebd20063..00000000 --- a/lib/presentation/registration/allergies_screen/models/allergies_model.dart +++ /dev/null @@ -1,20 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; - -/// This class defines the variables used in the [allergies_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class AllergiesModel extends Equatable { - UserRegistrationSheet userRegistrationSheet; - AllergiesModel({required this.userRegistrationSheet}); - - AllergiesModel copyWith() { - return AllergiesModel( - userRegistrationSheet: userRegistrationSheet, - ); - } - - @override - List get props => [userRegistrationSheet]; -} diff --git a/lib/presentation/registration/app_navigation_screen/app_navigation_screen.dart b/lib/presentation/registration/app_navigation_screen/app_navigation_screen.dart deleted file mode 100644 index cbf92f01..00000000 --- a/lib/presentation/registration/app_navigation_screen/app_navigation_screen.dart +++ /dev/null @@ -1,233 +0,0 @@ -import 'package:go_router/go_router.dart'; - -import 'bloc/app_navigation_bloc.dart'; -import 'models/app_navigation_model.dart'; -import 'package:eatvio_app/core/app_export.dart'; -import 'package:flutter/material.dart'; - -class AppNavigationScreen extends StatefulWidget { - const AppNavigationScreen({Key? key}) - : super( - key: key, - ); - - static Widget builder(BuildContext context) { - return BlocProvider( - create: (context) => AppNavigationBloc(AppNavigationState( - appNavigationModelObj: AppNavigationModel(), - ),) - ..add(AppNavigationInitialEvent()), - child: AppNavigationScreen(), - ); - } - - @override - State createState() => _AppNavigationScreenState(); -} - -class _AppNavigationScreenState extends State { - @override - Widget build(BuildContext context) { - mediaQueryData = MediaQuery.of(context); - - return BlocBuilder( - builder: (context, state) { - return SafeArea( - child: Scaffold( - backgroundColor: Color(0XFFFFFFFF), - body: SizedBox( - width: double.maxFinite, - child: Column( - children: [ - _buildAppNavigation(context), - Expanded( - child: SingleChildScrollView( - child: Container( - decoration: BoxDecoration( - color: Color(0XFFFFFFFF), - ), - child: Column( - children: [ - _buildScreenTitle( - context, - screenTitle: "date_of_birth".tr, - onTapScreenTitle: () => GoRouter.of(context).goNamed('dateOfBirthScreen'), - ), - _buildScreenTitle( - context, - screenTitle: "city_of_living".tr, - onTapScreenTitle: () => GoRouter.of(context).goNamed('cityOfLivingScreen'), - ), - _buildScreenTitle( - context, - screenTitle: "body_circumferences".tr, - onTapScreenTitle: () => GoRouter.of(context).goNamed('bodyCircumferencesScreen'), - ), - _buildScreenTitle( - context, - screenTitle: "weight".tr, - onTapScreenTitle: () => GoRouter.of(context).goNamed('weightScreen'), - ), - _buildScreenTitle( - context, - screenTitle: "allergies".tr, - onTapScreenTitle: () => GoRouter.of(context).goNamed('allergiesScreen'), - ), - _buildScreenTitle( - context, - screenTitle: "medicine_intake".tr, - onTapScreenTitle: () => GoRouter.of(context).goNamed('medicineIntakeScreen'), - ), - _buildScreenTitle( - context, - screenTitle: "splash_screen".tr, - onTapScreenTitle: () => GoRouter.of(context).goNamed('splashScreen'), - ), - _buildScreenTitle( - context, - screenTitle: "gender".tr, - onTapScreenTitle: () => GoRouter.of(context).goNamed('genderScreen'), - ), - _buildScreenTitle( - context, - screenTitle: "blood_pressure".tr, - onTapScreenTitle: () => GoRouter.of(context).goNamed('bloodPressureScreen'), - ), - _buildScreenTitle( - context, - screenTitle: "favorite_sports".tr, - onTapScreenTitle: () => GoRouter.of(context).goNamed('favoriteSportsScreen'), - ), - _buildScreenTitle( - context, - screenTitle: "favorite_foods".tr, - onTapScreenTitle: () => GoRouter.of(context).goNamed('favoriteFoodsScreen'), - ), - _buildScreenTitle( - context, - screenTitle: "schedule".tr, - onTapScreenTitle: () => GoRouter.of(context).goNamed('scheduleScreen'), - ), - _buildScreenTitle( - context, - screenTitle: "additional_information".tr, - onTapScreenTitle: () => GoRouter.of(context).goNamed('additionalInformationScreen'), - ), - _buildScreenTitle( - context, - screenTitle: "language_select".tr, - onTapScreenTitle: () => GoRouter.of(context).goNamed('languageSelectScreen'), - ), - _buildScreenTitle( - context, - screenTitle: "auth".tr, - onTapScreenTitle: () => GoRouter.of(context).goNamed('authScreen'), - ), - ], - ), - ), - ), - ), - ], - ), - ), - ), - ); - }, - ); - } - - /// Section Widget - _buildAppNavigation(BuildContext context) { - return Container( - decoration: BoxDecoration( - color: Color(0XFFFFFFFF), - ), - child: Column( - children: [ - SizedBox(height: 10.v), - Align( - alignment: Alignment.centerLeft, - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 20.h), - child: Text( - "App Navigation".tr, - textAlign: TextAlign.center, - style: TextStyle( - color: Color(0XFF000000), - fontSize: 20.fSize, - fontWeight: FontWeight.w400, - ), - ), - ), - ), - SizedBox(height: 10.v), - Align( - alignment: Alignment.centerLeft, - child: Padding( - padding: EdgeInsets.only(left: 20.h), - child: Text( - "Check your app's UI from the below demo screens of your app.".tr, - textAlign: TextAlign.center, - style: TextStyle( - color: Color(0XFF888888), - fontSize: 16.fSize, - fontWeight: FontWeight.w400, - ), - ), - ), - ), - SizedBox(height: 5.v), - Divider( - height: 1.v, - thickness: 1.v, - color: Color(0XFF000000), - ), - ], - ), - ); - } - - /// Common widget - _buildScreenTitle( - BuildContext context, { - required String screenTitle, - Function? onTapScreenTitle, - }) { - return GestureDetector( - onTap: onTapScreenTitle!.call(), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFFFFFFF), - ), - child: Column( - children: [ - SizedBox(height: 10.v), - Align( - alignment: Alignment.centerLeft, - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 20.h), - child: Text( - screenTitle, - textAlign: TextAlign.center, - style: TextStyle( - color: Color(0XFF000000), - fontSize: 20.fSize, - fontWeight: FontWeight.w400, - ), - ), - ), - ), - SizedBox(height: 10.v), - SizedBox(height: 5.v), - Divider( - height: 1.v, - thickness: 1.v, - color: Color(0XFF888888), - ), - ], - ), - ), - ); - } -} diff --git a/lib/presentation/registration/app_navigation_screen/bloc/app_navigation_bloc.dart b/lib/presentation/registration/app_navigation_screen/bloc/app_navigation_bloc.dart deleted file mode 100644 index adb51100..00000000 --- a/lib/presentation/registration/app_navigation_screen/bloc/app_navigation_bloc.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/app_navigation_screen/models/app_navigation_model.dart'; -part 'app_navigation_event.dart'; -part 'app_navigation_state.dart'; - -/// A bloc that manages the state of a AppNavigation according to the event that is dispatched to it. -class AppNavigationBloc extends Bloc { - AppNavigationBloc(AppNavigationState initialState) : super(initialState) { - on(_onInitialize); - } - - _onInitialize( - AppNavigationInitialEvent event, - Emitter emit, - ) async {} -} diff --git a/lib/presentation/registration/app_navigation_screen/bloc/app_navigation_event.dart b/lib/presentation/registration/app_navigation_screen/bloc/app_navigation_event.dart deleted file mode 100644 index 649738e6..00000000 --- a/lib/presentation/registration/app_navigation_screen/bloc/app_navigation_event.dart +++ /dev/null @@ -1,16 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'app_navigation_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///AppNavigation widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class AppNavigationEvent extends Equatable {} - -/// Event that is dispatched when the AppNavigation widget is first created. -class AppNavigationInitialEvent extends AppNavigationEvent { - @override - List get props => []; -} diff --git a/lib/presentation/registration/app_navigation_screen/bloc/app_navigation_state.dart b/lib/presentation/registration/app_navigation_screen/bloc/app_navigation_state.dart deleted file mode 100644 index 2ee33461..00000000 --- a/lib/presentation/registration/app_navigation_screen/bloc/app_navigation_state.dart +++ /dev/null @@ -1,21 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'app_navigation_bloc.dart'; - -/// Represents the state of AppNavigation in the application. -class AppNavigationState extends Equatable { - AppNavigationState({this.appNavigationModelObj}); - - AppNavigationModel? appNavigationModelObj; - - @override - List get props => [ - appNavigationModelObj, - ]; - AppNavigationState copyWith({AppNavigationModel? appNavigationModelObj}) { - return AppNavigationState( - appNavigationModelObj: - appNavigationModelObj ?? this.appNavigationModelObj, - ); - } -} diff --git a/lib/presentation/registration/app_navigation_screen/models/app_navigation_model.dart b/lib/presentation/registration/app_navigation_screen/models/app_navigation_model.dart deleted file mode 100644 index 73fd71d7..00000000 --- a/lib/presentation/registration/app_navigation_screen/models/app_navigation_model.dart +++ /dev/null @@ -1,16 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; - -/// This class defines the variables used in the [app_navigation_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class AppNavigationModel extends Equatable { - AppNavigationModel(); - - AppNavigationModel copyWith() { - return AppNavigationModel(); - } - - @override - List get props => []; -} diff --git a/lib/presentation/registration/blood_pressure_screen/bloc/blood_pressure_bloc.dart b/lib/presentation/registration/blood_pressure_screen/bloc/blood_pressure_bloc.dart deleted file mode 100644 index 64e3e019..00000000 --- a/lib/presentation/registration/blood_pressure_screen/bloc/blood_pressure_bloc.dart +++ /dev/null @@ -1,72 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/blood_pressure_screen/models/blood_pressure_model.dart'; - -part 'blood_pressure_event.dart'; - -part 'blood_pressure_state.dart'; - -/// A bloc that manages the state of a BloodPressure according to the event that is dispatched to it. -class BloodPressureBloc extends Bloc { - BloodPressureBloc(BloodPressureState initialState) : super(initialState) { - on(_onInitialize); - on(_changeHypoDropDown); - on(_changeHyperDropDown); - } - - _changeHyperDropDown( - ChangeHyperDropDownEvent event, - Emitter emit, - ) { - if (event.value.id == 1) { - // state.bloodPressureModelObj!.userRegistrationSheet.hasHyper = '1'; - } else { - // state.bloodPressureModelObj!.userRegistrationSheet.hasHyper = '0'; - } - emit(state.copyWith(selectedHyperValue: event.value)); - } - - _changeHypoDropDown( - ChangeHypoDownEvent event, - Emitter emit, - ) { - if (event.value.id == 1) { - // state.bloodPressureModelObj!.userRegistrationSheet.hasHypo = '1'; - } else { - // state.bloodPressureModelObj!.userRegistrationSheet.hasHypo = '0'; - } - emit(state.copyWith(selectedHypoValue: event.value)); - } - - List fillDropdownItemList() { - return [ - SelectionPopupModel( - id: 1, - title: "Да", - ), - SelectionPopupModel( - id: 2, - title: "Нет", - isSelected: true, - ), - ]; - } - - _onInitialize( - BloodPressureInitialEvent event, - Emitter emit, - ) async { - emit( - state.copyWith( - upPressureController: TextEditingController(), - downPressureController: TextEditingController(), - ), - ); - emit( - state.copyWith( - bloodPressureModelObj: state.bloodPressureModelObj?.copyWith(dropdownItemList: fillDropdownItemList()), - ), - ); - } -} diff --git a/lib/presentation/registration/blood_pressure_screen/bloc/blood_pressure_event.dart b/lib/presentation/registration/blood_pressure_screen/bloc/blood_pressure_event.dart deleted file mode 100644 index 677d2436..00000000 --- a/lib/presentation/registration/blood_pressure_screen/bloc/blood_pressure_event.dart +++ /dev/null @@ -1,39 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'blood_pressure_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///BloodPressure widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class BloodPressureEvent extends Equatable {} - -/// Event that is dispatched when the BloodPressure widget is first created. -class BloodPressureInitialEvent extends BloodPressureEvent { - @override - List get props => []; -} - -///event for dropdown selection -class ChangeHyperDropDownEvent extends BloodPressureEvent { - ChangeHyperDropDownEvent({required this.value}); - - SelectionPopupModel value; - - @override - List get props => [ - value, - ]; -} - -class ChangeHypoDownEvent extends BloodPressureEvent { - ChangeHypoDownEvent({required this.value}); - - SelectionPopupModel value; - - @override - List get props => [ - value, - ]; -} diff --git a/lib/presentation/registration/blood_pressure_screen/bloc/blood_pressure_state.dart b/lib/presentation/registration/blood_pressure_screen/bloc/blood_pressure_state.dart deleted file mode 100644 index d1db1c49..00000000 --- a/lib/presentation/registration/blood_pressure_screen/bloc/blood_pressure_state.dart +++ /dev/null @@ -1,50 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'blood_pressure_bloc.dart'; - -/// Represents the state of BloodPressure in the application. -class BloodPressureState extends Equatable { - BloodPressureState({ - this.upPressureController, - this.downPressureController, - this.selectedHyperValue, - this.selectedHypoValue, - this.bloodPressureModelObj, - }); - - TextEditingController? upPressureController; - - TextEditingController? downPressureController; - - SelectionPopupModel? selectedHypoValue; - - SelectionPopupModel? selectedHyperValue; - - BloodPressureModel? bloodPressureModelObj; - - @override - List get props => [ - upPressureController, - downPressureController, - selectedHyperValue, - selectedHypoValue, - bloodPressureModelObj, - ]; - BloodPressureState copyWith({ - TextEditingController? upPressureController, - TextEditingController? downPressureController, - SelectionPopupModel? selectedHyperValue, - SelectionPopupModel? selectedHypoValue, - BloodPressureModel? bloodPressureModelObj, - }) { - return BloodPressureState( - upPressureController: upPressureController ?? this.upPressureController, - downPressureController: - downPressureController ?? this.downPressureController, - selectedHyperValue: selectedHyperValue ?? this.selectedHyperValue, - selectedHypoValue: selectedHypoValue ?? this.selectedHypoValue, - bloodPressureModelObj: - bloodPressureModelObj ?? this.bloodPressureModelObj, - ); - } -} diff --git a/lib/presentation/registration/blood_pressure_screen/models/blood_pressure_model.dart b/lib/presentation/registration/blood_pressure_screen/models/blood_pressure_model.dart deleted file mode 100644 index 2d8463ef..00000000 --- a/lib/presentation/registration/blood_pressure_screen/models/blood_pressure_model.dart +++ /dev/null @@ -1,25 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; -import 'package:eatvio_app/data/models/selectionPopupModel/selection_popup_model.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; - -/// This class defines the variables used in the [blood_pressure_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class BloodPressureModel extends Equatable { - UserRegistrationSheet userRegistrationSheet; - BloodPressureModel( - {required this.userRegistrationSheet, this.dropdownItemList = const [],}); - - List dropdownItemList; - - BloodPressureModel copyWith({List? dropdownItemList}) { - return BloodPressureModel( - userRegistrationSheet: userRegistrationSheet, - dropdownItemList: dropdownItemList ?? this.dropdownItemList, - ); - } - - @override - List get props => [dropdownItemList, userRegistrationSheet]; -} diff --git a/lib/presentation/registration/body_circumferences_screen/bloc/body_circumferences_bloc.dart b/lib/presentation/registration/body_circumferences_screen/bloc/body_circumferences_bloc.dart deleted file mode 100644 index 871ff8dc..00000000 --- a/lib/presentation/registration/body_circumferences_screen/bloc/body_circumferences_bloc.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/body_circumferences_screen/models/body_circumferences_model.dart'; -part 'body_circumferences_event.dart'; -part 'body_circumferences_state.dart'; - -/// A bloc that manages the state of a BodyCircumferences according to the event that is dispatched to it. -class BodyCircumferencesBloc - extends Bloc { - BodyCircumferencesBloc(BodyCircumferencesState initialState) - : super(initialState) { - on(_onInitialize); - } - - _onInitialize( - BodyCircumferencesInitialEvent event, - Emitter emit, - ) async { - emit(state.copyWith( - chestCircumferenceController: TextEditingController(), - waistCircumferenceController: TextEditingController(), - hipCircumferenceController: TextEditingController(),),); - } -} diff --git a/lib/presentation/registration/body_circumferences_screen/bloc/body_circumferences_event.dart b/lib/presentation/registration/body_circumferences_screen/bloc/body_circumferences_event.dart deleted file mode 100644 index d164270e..00000000 --- a/lib/presentation/registration/body_circumferences_screen/bloc/body_circumferences_event.dart +++ /dev/null @@ -1,16 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'body_circumferences_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///BodyCircumferences widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class BodyCircumferencesEvent extends Equatable {} - -/// Event that is dispatched when the BodyCircumferences widget is first created. -class BodyCircumferencesInitialEvent extends BodyCircumferencesEvent { - @override - List get props => []; -} diff --git a/lib/presentation/registration/body_circumferences_screen/bloc/body_circumferences_state.dart b/lib/presentation/registration/body_circumferences_screen/bloc/body_circumferences_state.dart deleted file mode 100644 index df28755c..00000000 --- a/lib/presentation/registration/body_circumferences_screen/bloc/body_circumferences_state.dart +++ /dev/null @@ -1,46 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'body_circumferences_bloc.dart'; - -/// Represents the state of BodyCircumferences in the application. -class BodyCircumferencesState extends Equatable { - BodyCircumferencesState({ - this.chestCircumferenceController, - this.waistCircumferenceController, - this.hipCircumferenceController, - this.bodyCircumferencesModelObj, - }); - - TextEditingController? chestCircumferenceController; - - TextEditingController? waistCircumferenceController; - - TextEditingController? hipCircumferenceController; - - BodyCircumferencesModel? bodyCircumferencesModelObj; - - @override - List get props => [ - chestCircumferenceController, - waistCircumferenceController, - hipCircumferenceController, - bodyCircumferencesModelObj, - ]; - BodyCircumferencesState copyWith({ - TextEditingController? chestCircumferenceController, - TextEditingController? waistCircumferenceController, - TextEditingController? hipCircumferenceController, - BodyCircumferencesModel? bodyCircumferencesModelObj, - }) { - return BodyCircumferencesState( - chestCircumferenceController: - chestCircumferenceController ?? this.chestCircumferenceController, - waistCircumferenceController: - waistCircumferenceController ?? this.waistCircumferenceController, - hipCircumferenceController: - hipCircumferenceController ?? this.hipCircumferenceController, - bodyCircumferencesModelObj: - bodyCircumferencesModelObj ?? this.bodyCircumferencesModelObj, - ); - } -} diff --git a/lib/presentation/registration/body_circumferences_screen/models/body_circumferences_model.dart b/lib/presentation/registration/body_circumferences_screen/models/body_circumferences_model.dart deleted file mode 100644 index 2af76f9d..00000000 --- a/lib/presentation/registration/body_circumferences_screen/models/body_circumferences_model.dart +++ /dev/null @@ -1,20 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; - -/// This class defines the variables used in the [body_circumferences_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class BodyCircumferencesModel extends Equatable { - UserRegistrationSheet userRegistrationSheet; - BodyCircumferencesModel({required this.userRegistrationSheet}); - - BodyCircumferencesModel copyWith() { - return BodyCircumferencesModel( - userRegistrationSheet: userRegistrationSheet, - ); - } - - @override - List get props => [userRegistrationSheet]; -} diff --git a/lib/presentation/registration/city_of_living_screen/bloc/city_of_living_bloc.dart b/lib/presentation/registration/city_of_living_screen/bloc/city_of_living_bloc.dart deleted file mode 100644 index e642961e..00000000 --- a/lib/presentation/registration/city_of_living_screen/bloc/city_of_living_bloc.dart +++ /dev/null @@ -1,37 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/city_of_living_screen/models/city_of_living_model.dart'; -part 'city_of_living_event.dart'; -part 'city_of_living_state.dart'; - -/// A bloc that manages the state of a CityOfLiving according to the event that is dispatched to it. -class CityOfLivingBloc extends Bloc { - CityOfLivingBloc(CityOfLivingState initialState) : super(initialState) { - on(_onInitialize); - on(_changeDropDown); - } - - _onInitialize( - CityOfLivingInitialEvent event, - Emitter emit, - ) async { - emit(state.copyWith( - cityOfLivingModelObj: state.cityOfLivingModelObj?.copyWith( - dropdownItemList: fillDropdownItemList(), - ),),); - } - - _changeDropDown( - ChangeDropDownEvent event, - Emitter emit, - ) { - emit(state.copyWith(selectedDropDownValue: event.value)); - // state.cityOfLivingModelObj?.userRegistrationSheet.country = - event.value.title; - } - - List fillDropdownItemList() { - return [SelectionPopupModel(id: 1, title: "Россия", isSelected: true)]; - } -} diff --git a/lib/presentation/registration/city_of_living_screen/bloc/city_of_living_event.dart b/lib/presentation/registration/city_of_living_screen/bloc/city_of_living_event.dart deleted file mode 100644 index d8418128..00000000 --- a/lib/presentation/registration/city_of_living_screen/bloc/city_of_living_event.dart +++ /dev/null @@ -1,28 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'city_of_living_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///CityOfLiving widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class CityOfLivingEvent extends Equatable {} - -/// Event that is dispatched when the CityOfLiving widget is first created. -class CityOfLivingInitialEvent extends CityOfLivingEvent { - @override - List get props => []; -} - -///event for dropdown selection -class ChangeDropDownEvent extends CityOfLivingEvent { - ChangeDropDownEvent({required this.value}); - - SelectionPopupModel value; - - @override - List get props => [ - value, - ]; -} diff --git a/lib/presentation/registration/city_of_living_screen/bloc/city_of_living_state.dart b/lib/presentation/registration/city_of_living_screen/bloc/city_of_living_state.dart deleted file mode 100644 index 5179b21e..00000000 --- a/lib/presentation/registration/city_of_living_screen/bloc/city_of_living_state.dart +++ /dev/null @@ -1,37 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'city_of_living_bloc.dart'; - -/// Represents the state of CityOfLiving in the application. -class CityOfLivingState extends Equatable { - CityOfLivingState({ - this.selectedDropDownValue, - this.cityController, - this.cityOfLivingModelObj, - }); - - SelectionPopupModel? selectedDropDownValue; - - TextEditingController? cityController; - - CityOfLivingModel? cityOfLivingModelObj; - - @override - List get props => [ - selectedDropDownValue, - cityController, - cityOfLivingModelObj, - ]; - CityOfLivingState copyWith({ - SelectionPopupModel? selectedDropDownValue, - SelectionPopupModel? selectedDropDownValue1, - CityOfLivingModel? cityOfLivingModelObj, - }) { - return CityOfLivingState( - selectedDropDownValue: - selectedDropDownValue ?? this.selectedDropDownValue, - cityController: cityController ?? this.cityController, - cityOfLivingModelObj: cityOfLivingModelObj ?? this.cityOfLivingModelObj, - ); - } -} diff --git a/lib/presentation/registration/city_of_living_screen/models/city_of_living_model.dart b/lib/presentation/registration/city_of_living_screen/models/city_of_living_model.dart deleted file mode 100644 index 24eb6d9c..00000000 --- a/lib/presentation/registration/city_of_living_screen/models/city_of_living_model.dart +++ /dev/null @@ -1,1153 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; -import 'package:eatvio_app/data/models/selectionPopupModel/selection_popup_model.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; - -/// This class defines the variables used in the [city_of_living_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class CityOfLivingModel extends Equatable { - UserRegistrationSheet userRegistrationSheet; - CityOfLivingModel({ - required this.userRegistrationSheet, - this.dropdownItemList = const [], - this.cityList = const [ - "Абаза", - "Абакан", - "Абдулино", - "Абинск", - "Агидель", - "Агрыз", - "Адыгейск", - "Азнакаево", - "Азов", - "Ак-Довурак", - "Аксай", - "Алагир", - "Алапаевск", - "Алатырь", - "Алдан", - "Алейск", - "Александров", - "Александровск", - "Александровск-Сахалинский", - "Алексеевка", - "Алексин", - "Алзамай", - "АлупкаОспаривается", - "АлуштаОспаривается", - "Альметьевск", - "Амурск", - "Анадырь", - "Анапа", - "Ангарск", - "Андреаполь", - "Анжеро-Судженск", - "Анива", - "Апатиты", - "Апрелевка", - "Апшеронск", - "Арамиль", - "Аргун", - "Ардатов", - "Ардон", - "Арзамас", - "Аркадак", - "Армавир", - "АрмянскОспаривается", - "Арсеньев", - "Арск", - "Артём", - "Артёмовск", - "Артёмовский", - "Архангельск", - "Асбест", - "Асино", - "Астрахань", - "Аткарск", - "Ахтубинск", - "Ачинск", - "Аша", - "Бабаево", - "Бабушкин", - "Бавлы", - "Багратионовск", - "Байкальск", - "Баймак", - "Бакал", - "Баксан", - "Балабаново", - "Балаково", - "Балахна", - "Балашиха", - "Балашов", - "Балей", - "Балтийск", - "Барабинск", - "Барнаул", - "Барыш", - "Батайск", - "БахчисарайОспаривается", - "Бежецк", - "Белая Калитва", - "Белая Холуница", - "Белгород", - "Белебей", - "Белёв", - "Белинский", - "Белово", - "Белогорск", - "БелогорскОспаривается", - "Белозерск", - "Белокуриха", - "Беломорск", - "Белоозёрский", - "Белорецк", - "Белореченск", - "Белоусово", - "Белоярский", - "Белый", - "Бердск", - "Березники", - "Берёзовский", - "Берёзовский", - "Беслан", - "Бийск", - "Бикин", - "Билибино", - "Биробиджан", - "Бирск", - "Бирюсинск", - "Бирюч", - "Благовещенск", - "Благовещенск", - "Благодарный", - "Бобров", - "Богданович", - "Богородицк", - "Богородск", - "Боготол", - "Богучар", - "Бодайбо", - "Бокситогорск", - "Болгар", - "Бологое", - "Болотное", - "Болохово", - "Болхов", - "Большой Камень", - "Бор", - "Борзя", - "Борисоглебск", - "Боровичи", - "Боровск", - "Бородино", - "Братск", - "Бронницы", - "Брянск", - "Бугульма", - "Бугуруслан", - "Будённовск", - "Бузулук", - "Буинск", - "Буй", - "Буйнакск", - "Бутурлиновка", - "Валдай", - "Валуйки", - "Велиж", - "Великие Луки", - "Великий Новгород", - "Великий Устюг", - "Вельск", - "Венёв", - "Верещагино", - "Верея", - "Верхнеуральск", - "Верхний Тагил", - "Верхний Уфалей", - "Верхняя Пышма", - "Верхняя Салда", - "Верхняя Тура", - "Верхотурье", - "Верхоянск", - "Весьегонск", - "Ветлуга", - "Видное", - "Вилюйск", - "Вилючинск", - "Вихоревка", - "Вичуга", - "Владивосток", - "Владикавказ", - "Владимир", - "Волгоград", - "Волгодонск", - "Волгореченск", - "Волжск", - "Волжский", - "Вологда", - "Володарск", - "Волоколамск", - "Волосово", - "Волхов", - "Волчанск", - "Вольск", - "Воркута", - "Воронеж", - "Ворсма", - "Воскресенск", - "Воткинск", - "Всеволожск", - "Вуктыл", - "Выборг", - "Выкса", - "Высоковск", - "Высоцк", - "Вытегра", - "Вышний Волочёк", - "Вяземский", - "Вязники", - "Вязьма", - "Вятские Поляны", - "Гаврилов Посад", - "Гаврилов-Ям", - "Гагарин", - "Гаджиево", - "Гай", - "Галич", - "Гатчина", - "Гвардейск", - "Гдов", - "Геленджик", - "Георгиевск", - "Глазов", - "Голицыно", - "Горбатов", - "Горно-Алтайск", - "Горнозаводск", - "Горняк", - "Городец", - "Городище", - "Городовиковск", - "Гороховец", - "Горячий Ключ", - "Грайворон", - "Гремячинск", - "Грозный", - "Грязи", - "Грязовец", - "Губаха", - "Губкин", - "Губкинский", - "Гудермес", - "Гуково", - "Гулькевичи", - "Гурьевск", - "Гурьевск", - "Гусев", - "Гусиноозёрск", - "Гусь-Хрустальный", - "Давлеканово", - "Дагестанские Огни", - "Далматово", - "Дальнегорск", - "Дальнереченск", - "Данилов", - "Данков", - "Дегтярск", - "Дедовск", - "Демидов", - "Дербент", - "Десногорск", - "ДжанкойОспаривается", - "Дзержинск", - "Дзержинский", - "Дивногорск", - "Дигора", - "Димитровград", - "Дмитриев", - "Дмитров", - "Дмитровск", - "Дно", - "Добрянка", - "Долгопрудный", - "Долинск", - "Домодедово", - "Донецк", - "Донской", - "Дорогобуж", - "Дрезна", - "Дубна", - "Дубовка", - "Дудинка", - "Духовщина", - "Дюртюли", - "Дятьково", - "ЕвпаторияОспаривается", - "Егорьевск", - "Ейск", - "Екатеринбург", - "Елабуга", - "Елец", - "Елизово", - "Ельня", - "Еманжелинск", - "Емва", - "Енисейск", - "Ермолино", - "Ершов", - "Ессентуки", - "Ефремов", - "Железноводск", - "Железногорск", - "Железногорск", - "Железногорск-Илимский", - "Жердевка", - "Жигулёвск", - "Жиздра", - "Жирновск", - "Жуков", - "Жуковка", - "Жуковский", - "Завитинск", - "Заводоуковск", - "Заволжск", - "Заволжье", - "Задонск", - "Заинск", - "Закаменск", - "Заозёрный", - "Заозёрск", - "Западная Двина", - "Заполярный", - "Зарайск", - "Заречный", - "Заречный", - "Заринск", - "Звенигово", - "Звенигород", - "Зверево", - "Зеленогорск", - "Зеленоградск", - "Зеленодольск", - "Зеленокумск", - "Зерноград", - "Зея", - "Зима", - "Златоуст", - "Злынка", - "Змеиногорск", - "Знаменск", - "Зубцов", - "Зуевка", - "Ивангород", - "Иваново", - "Ивантеевка", - "Ивдель", - "Игарка", - "Ижевск", - "Избербаш", - "Изобильный", - "Иланский", - "Инза", - "Иннополис", - "Инсар", - "Инта", - "Ипатово", - "Ирбит", - "Иркутск", - "Исилькуль", - "Искитим", - "Истра", - "Ишим", - "Ишимбай", - "Йошкар-Ола", - "Кадников", - "Казань", - "Калач", - "Калач-на-Дону", - "Калачинск", - "Калининград", - "Калининск", - "Калтан", - "Калуга", - "Калязин", - "Камбарка", - "Каменка", - "Каменногорск", - "Каменск-Уральский", - "Каменск-Шахтинский", - "Камень-на-Оби", - "Камешково", - "Камызяк", - "Камышин", - "Камышлов", - "Канаш", - "Кандалакша", - "Канск", - "Карабаново", - "Карабаш", - "Карабулак", - "Карасук", - "Карачаевск", - "Карачев", - "Каргат", - "Каргополь", - "Карпинск", - "Карталы", - "Касимов", - "Касли", - "Каспийск", - "Катав-Ивановск", - "Катайск", - "Качканар", - "Кашин", - "Кашира", - "Кедровый", - "Кемерово", - "Кемь", - "КерчьОспаривается", - "Кизел", - "Кизилюрт", - "Кизляр", - "Кимовск", - "Кимры", - "Кингисепп", - "Кинель", - "Кинешма", - "Киреевск", - "Киренск", - "Киржач", - "Кириллов", - "Кириши", - "Киров", - "Киров", - "Кировград", - "Кирово-Чепецк", - "Кировск", - "Кировск", - "Кирс", - "Кирсанов", - "Киселёвск", - "Кисловодск", - "Клин", - "Клинцы", - "Княгинино", - "Ковдор", - "Ковров", - "Ковылкино", - "Когалым", - "Кодинск", - "Козельск", - "Козловка", - "Козьмодемьянск", - "Кола", - "Кологрив", - "Коломна", - "Колпашево", - "Кольчугино", - "Коммунар", - "Комсомольск", - "Комсомольск-на-Амуре", - "Конаково", - "Кондопога", - "Кондрово", - "Константиновск", - "Копейск", - "Кораблино", - "Кореновск", - "Коркино", - "Королёв", - "Короча", - "Корсаков", - "Коряжма", - "Костерёво", - "Костомукша", - "Кострома", - "Котельники", - "Котельниково", - "Котельнич", - "Котлас", - "Котово", - "Котовск", - "Кохма", - "Красавино", - "Красноармейск", - "Красноармейск", - "Красновишерск", - "Красногорск", - "Краснодар", - "Краснозаводск", - "Краснознаменск", - "Краснознаменск", - "Краснокаменск", - "Краснокамск", - "КрасноперекопскОспаривается", - "Краснослободск", - "Краснослободск", - "Краснотурьинск", - "Красноуральск", - "Красноуфимск", - "Красноярск", - "Красный Кут", - "Красный Сулин", - "Красный Холм", - "Кремёнки", - "Кропоткин", - "Крымск", - "Кстово", - "Кубинка", - "Кувандык", - "Кувшиново", - "Кудрово", - "Кудымкар", - "Кузнецк", - "Куйбышев", - "Кукмор", - "Кулебаки", - "Кумертау", - "Кунгур", - "Купино", - "Курган", - "Курганинск", - "Курильск", - "Курлово", - "Куровское", - "Курск", - "Куртамыш", - "Курчалой", - "Курчатов", - "Куса", - "Кушва", - "Кызыл", - "Кыштым", - "Кяхта", - "Лабинск", - "Лабытнанги", - "Лагань", - "Ладушкин", - "Лаишево", - "Лакинск", - "Лангепас", - "Лахденпохья", - "Лебедянь", - "Лениногорск", - "Ленинск", - "Ленинск-Кузнецкий", - "Ленск", - "Лермонтов", - "Лесной", - "Лесозаводск", - "Лесосибирск", - "Ливны", - "Ликино-Дулёво", - "Липецк", - "Липки", - "Лиски", - "Лихославль", - "Лобня", - "Лодейное Поле", - "Лосино-Петровский", - "Луга", - "Луза", - "Лукоянов", - "Луховицы", - "Лысково", - "Лысьва", - "Лыткарино", - "Льгов", - "Любань", - "Люберцы", - "Любим", - "Людиново", - "Лянтор", - "Магадан", - "Магас", - "Магнитогорск", - "Майкоп", - "Майский", - "Макаров", - "Макарьев", - "Макушино", - "Малая Вишера", - "Малгобек", - "Малмыж", - "Малоархангельск", - "Малоярославец", - "Мамадыш", - "Мамоново", - "Мантурово", - "Мариинск", - "Мариинский Посад", - "Маркс", - "Махачкала", - "Мглин", - "Мегион", - "Медвежьегорск", - "Медногорск", - "Медынь", - "Межгорье", - "Междуреченск", - "Мезень", - "Меленки", - "Мелеуз", - "Менделеевск", - "Мензелинск", - "Мещовск", - "Миасс", - "Микунь", - "Миллерово", - "Минеральные Воды", - "Минусинск", - "Миньяр", - "Мирный", - "Мирный", - "Михайлов", - "Михайловка", - "Михайловск", - "Михайловск", - "Мичуринск", - "Могоча", - "Можайск", - "Можга", - "Моздок", - "Мончегорск", - "Морозовск", - "Моршанск", - "Мосальск", - "Москва", - "Муравленко", - "Мураши", - "Мурино", - "Мурманск", - "Муром", - "Мценск", - "Мыски", - "Мытищи", - "Мышкин", - "Набережные Челны", - "Навашино", - "Наволоки", - "Надым", - "Назарово", - "Назрань", - "Называевск", - "Нальчик", - "Нариманов", - "Наро-Фоминск", - "Нарткала", - "Нарьян-Мар", - "Находка", - "Невель", - "Невельск", - "Невинномысск", - "Невьянск", - "Нелидово", - "Неман", - "Нерехта", - "Нерчинск", - "Нерюнгри", - "Нестеров", - "Нефтегорск", - "Нефтекамск", - "Нефтекумск", - "Нефтеюганск", - "Нея", - "Нижневартовск", - "Нижнекамск", - "Нижнеудинск", - "Нижние Серги", - "Нижний Ломов", - "Нижний Новгород", - "Нижний Тагил", - "Нижняя Салда", - "Нижняя Тура", - "Николаевск", - "Николаевск-на-Амуре", - "Никольск", - "Никольск", - "Никольское", - "Новая Ладога", - "Новая Ляля", - "Новоалександровск", - "Новоалтайск", - "Новоаннинский", - "Нововоронеж", - "Новодвинск", - "Новозыбков", - "Новокубанск", - "Новокузнецк", - "Новокуйбышевск", - "Новомичуринск", - "Новомосковск", - "Новопавловск", - "Новоржев", - "Новороссийск", - "Новосибирск", - "Новосиль", - "Новосокольники", - "Новотроицк", - "Новоузенск", - "Новоульяновск", - "Новоуральск", - "Новохопёрск", - "Новочебоксарск", - "Новочеркасск", - "Новошахтинск", - "Новый Оскол", - "Новый Уренгой", - "Ногинск", - "Нолинск", - "Норильск", - "Ноябрьск", - "Нурлат", - "Нытва", - "Нюрба", - "Нягань", - "Нязепетровск", - "Няндома", - "Облучье", - "Обнинск", - "Обоянь", - "Обь", - "Одинцово", - "Озёрск", - "Озёрск", - "Озёры", - "Октябрьск", - "Октябрьский", - "Окуловка", - "Олёкминск", - "Оленегорск", - "Олонец", - "Омск", - "Омутнинск", - "Онега", - "Опочка", - "Орёл", - "Оренбург", - "Орехово-Зуево", - "Орлов", - "Орск", - "Оса", - "Осинники", - "Осташков", - "Остров", - "Островной", - "Острогожск", - "Отрадное", - "Отрадный", - "Оха", - "Оханск", - "Очёр", - "Павлово", - "Павловск", - "Павловский Посад", - "Палласовка", - "Партизанск", - "Певек", - "Пенза", - "Первомайск", - "Первоуральск", - "Перевоз", - "Пересвет", - "Переславль-Залесский", - "Пермь", - "Пестово", - "Петров Вал", - "Петровск", - "Петровск-Забайкальский", - "Петрозаводск", - "Петропавловск-Камчатский", - "Петухово", - "Петушки", - "Печора", - "Печоры", - "Пикалёво", - "Пионерский", - "Питкяранта", - "Плавск", - "Пласт", - "Плёс", - "Поворино", - "Подольск", - "Подпорожье", - "Покачи", - "Покров", - "Покровск", - "Полевской", - "Полесск", - "Полысаево", - "Полярные Зори", - "Полярный", - "Поронайск", - "Порхов", - "Похвистнево", - "Почеп", - "Починок", - "Пошехонье", - "Правдинск", - "Приволжск", - "Приморск", - "Приморск", - "Приморско-Ахтарск", - "Приозерск", - "Прокопьевск", - "Пролетарск", - "Протвино", - "Прохладный", - "Псков", - "Пугачёв", - "Пудож", - "Пустошка", - "Пучеж", - "Пушкино", - "Пущино", - "Пыталово", - "Пыть-Ях", - "Пятигорск", - "Радужный", - "Радужный", - "Райчихинск", - "Раменское", - "Рассказово", - "Ревда", - "Реж", - "Реутов", - "Ржев", - "Родники", - "Рославль", - "Россошь", - "Ростов-на-Дону", - "Ростов", - "Рошаль", - "Ртищево", - "Рубцовск", - "Рудня", - "Руза", - "Рузаевка", - "Рыбинск", - "Рыбное", - "Рыльск", - "Ряжск", - "Рязань", - "СакиОспаривается", - "Салават", - "Салаир", - "Салехард", - "Сальск", - "Самара", - "Санкт-Петербург", - "Саранск", - "Сарапул", - "Саратов", - "Саров", - "Сасово", - "Сатка", - "Сафоново", - "Саяногорск", - "Саянск", - "Светлогорск", - "Светлоград", - "Светлый", - "Светогорск", - "Свирск", - "Свободный", - "Себеж", - "СевастопольОспаривается", - "Северо-Курильск", - "Северобайкальск", - "Северодвинск", - "Североморск", - "Североуральск", - "Северск", - "Севск", - "Сегежа", - "Сельцо", - "Семёнов", - "Семикаракорск", - "Семилуки", - "Сенгилей", - "Серафимович", - "Сергач", - "Сергиев Посад", - "Сердобск", - "Серов", - "Серпухов", - "Сертолово", - "Сибай", - "Сим", - "СимферопольОспаривается", - "Сковородино", - "Скопин", - "Славгород", - "Славск", - "Славянск-на-Кубани", - "Сланцы", - "Слободской", - "Слюдянка", - "Смоленск", - "Снежинск", - "Снежногорск", - "Собинка", - "Советск", - "Советск", - "Советск", - "Советская Гавань", - "Советский", - "Сокол", - "Солигалич", - "Соликамск", - "Солнечногорск", - "Соль-Илецк", - "Сольвычегодск", - "Сольцы", - "Сорочинск", - "Сорск", - "Сортавала", - "Сосенский", - "Сосновка", - "Сосновоборск", - "Сосновый Бор", - "Сосногорск", - "Сочи", - "Спас-Деменск", - "Спас-Клепики", - "Спасск", - "Спасск-Дальний", - "Спасск-Рязанский", - "Среднеколымск", - "Среднеуральск", - "Сретенск", - "Ставрополь", - "Старая Купавна", - "Старая Русса", - "Старица", - "Стародуб", - "Старый КрымОспаривается", - "Старый Оскол", - "Стерлитамак", - "Стрежевой", - "Строитель", - "Струнино", - "Ступино", - "Суворов", - "СудакОспаривается", - "Суджа", - "Судогда", - "Суздаль", - "Сунжа", - "Суоярви", - "Сураж", - "Сургут", - "Суровикино", - "Сурск", - "Сусуман", - "Сухиничи", - "Сухой Лог", - "Сызрань", - "Сыктывкар", - "Сысерть", - "Сычёвка", - "Сясьстрой", - "Тавда", - "Таганрог", - "Тайга", - "Тайшет", - "Талдом", - "Талица", - "Тамбов", - "Тара", - "Тарко-Сале", - "Таруса", - "Татарск", - "Таштагол", - "Тверь", - "Теберда", - "Тейково", - "Темников", - "Темрюк", - "Терек", - "Тетюши", - "Тимашёвск", - "Тихвин", - "Тихорецк", - "Тобольск", - "Тогучин", - "Тольятти", - "Томари", - "Томмот", - "Томск", - "Топки", - "Торжок", - "Торопец", - "Тосно", - "Тотьма", - "Трёхгорный", - "Троицк", - "Трубчевск", - "Туапсе", - "Туймазы", - "Тула", - "Тулун", - "Туран", - "Туринск", - "Тутаев", - "Тында", - "Тырныауз", - "Тюкалинск", - "Тюмень", - "Уварово", - "Углегорск", - "Углич", - "Удачный", - "Удомля", - "Ужур", - "Узловая", - "Улан-Удэ", - "Ульяновск", - "Унеча", - "Урай", - "Урень", - "Уржум", - "Урус-Мартан", - "Урюпинск", - "Усинск", - "Усмань", - "Усолье-Сибирское", - "Усолье", - "Уссурийск", - "Усть-Джегута", - "Усть-Илимск", - "Усть-Катав", - "Усть-Кут", - "Усть-Лабинск", - "Устюжна", - "Уфа", - "Ухта", - "Учалы", - "Уяр", - "Фатеж", - "ФеодосияОспаривается", - "Фокино", - "Фокино", - "Фролово", - "Фрязино", - "Фурманов", - "Хабаровск", - "Хадыженск", - "Ханты-Мансийск", - "Харабали", - "Харовск", - "Хасавюрт", - "Хвалынск", - "Хилок", - "Химки", - "Холм", - "Холмск", - "Хотьково", - "Цивильск", - "Цимлянск", - "Циолковский", - "Чадан", - "Чайковский", - "Чапаевск", - "Чаплыгин", - "Чебаркуль", - "Чебоксары", - "Чегем", - "Чекалин", - "Челябинск", - "Чердынь", - "Черемхово", - "Черепаново", - "Череповец", - "Черкесск", - "Чёрмоз", - "Черноголовка", - "Черногорск", - "Чернушка", - "Черняховск", - "Чехов", - "Чистополь", - "Чита", - "Чкаловск", - "Чудово", - "Чулым", - "Чусовой", - "Чухлома", - "Шагонар", - "Шадринск", - "Шали", - "Шарыпово", - "Шарья", - "Шатура", - "Шахты", - "Шахунья", - "Шацк", - "Шебекино", - "Шелехов", - "Шенкурск", - "Шилка", - "Шимановск", - "Шиханы", - "Шлиссельбург", - "Шумерля", - "Шумиха", - "Шуя", - "Щёкино", - "ЩёлкиноОспаривается", - "Щёлково", - "Щигры", - "Щучье", - "Электрогорск", - "Электросталь", - "Электроугли", - "Элиста", - "Энгельс", - "Эртиль", - "Югорск", - "Южа", - "Южно-Сахалинск", - "Южно-Сухокумск", - "Южноуральск", - "Юрга", - "Юрьев-Польский", - "Юрьевец", - "Юрюзань", - "Юхнов", - "Ядрин", - "Якутск", - "ЯлтаОспаривается", - "Ялуторовск", - "Янаул", - "Яранск", - "Яровое", - "Ярославль", - "Ярцево", - "Ясногорск", - "Ясный", - "Яхрома", - ], - }); - - List dropdownItemList; - - List cityList; - - CityOfLivingModel copyWith({ - List? dropdownItemList, - List? dropdownItemList1, - }) { - return CityOfLivingModel( - userRegistrationSheet: userRegistrationSheet, - dropdownItemList: dropdownItemList ?? this.dropdownItemList, - cityList: cityList, - ); - } - - @override - List get props => - [dropdownItemList, cityList, userRegistrationSheet]; -} diff --git a/lib/presentation/registration/credentials_screen/bloc/credentials_bloc.dart b/lib/presentation/registration/credentials_screen/bloc/credentials_bloc.dart deleted file mode 100644 index f0d45cc0..00000000 --- a/lib/presentation/registration/credentials_screen/bloc/credentials_bloc.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/credentials_screen/models/credentials_model.dart'; -part 'credentials_event.dart'; -part 'credentials_state.dart'; - -/// A bloc that manages the state of a Credentials according to the event that is dispatched to it. -class CredentialsBloc extends Bloc { - CredentialsBloc(CredentialsState initialState) : super(initialState) { - on(_onInitialize); - } - - _onInitialize( - CredentialsInitialEvent event, - Emitter emit, - ) async { - emit(state.copyWith( - emailController: TextEditingController(), - nameController: TextEditingController(), - passwordController: TextEditingController(), - passwordConfirmationController: TextEditingController(),),); - } -} diff --git a/lib/presentation/registration/credentials_screen/bloc/credentials_event.dart b/lib/presentation/registration/credentials_screen/bloc/credentials_event.dart deleted file mode 100644 index 3001076a..00000000 --- a/lib/presentation/registration/credentials_screen/bloc/credentials_event.dart +++ /dev/null @@ -1,16 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'credentials_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///Credentials widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class CredentialsEvent extends Equatable {} - -/// Event that is dispatched when the Credentials widget is first created. -class CredentialsInitialEvent extends CredentialsEvent { - @override - List get props => []; -} diff --git a/lib/presentation/registration/credentials_screen/bloc/credentials_state.dart b/lib/presentation/registration/credentials_screen/bloc/credentials_state.dart deleted file mode 100644 index e127da6e..00000000 --- a/lib/presentation/registration/credentials_screen/bloc/credentials_state.dart +++ /dev/null @@ -1,49 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'credentials_bloc.dart'; - -/// Represents the state of Credentials in the application. -class CredentialsState extends Equatable { - CredentialsState({ - this.emailController, - this.nameController, - this.passwordController, - this.passwordConfirmationController, - this.credentialsModelObj, - }); - - TextEditingController? emailController; - - TextEditingController? nameController; - - TextEditingController? passwordController; - - TextEditingController? passwordConfirmationController; - - CredentialsModel? credentialsModelObj; - - @override - List get props => [ - emailController, - nameController, - passwordController, - passwordConfirmationController, - credentialsModelObj, - ]; - CredentialsState copyWith({ - TextEditingController? nameController, - TextEditingController? emailController, - TextEditingController? passwordController, - TextEditingController? passwordConfirmationController, - CredentialsModel? credentialsModelObj, - }) { - return CredentialsState( - emailController: emailController ?? this.emailController, - nameController: nameController ?? this.nameController, - passwordController: passwordController ?? this.passwordController, - passwordConfirmationController: - passwordConfirmationController ?? this.passwordConfirmationController, - credentialsModelObj: credentialsModelObj ?? this.credentialsModelObj, - ); - } -} diff --git a/lib/presentation/registration/credentials_screen/models/credentials_model.dart b/lib/presentation/registration/credentials_screen/models/credentials_model.dart deleted file mode 100644 index ae6c3201..00000000 --- a/lib/presentation/registration/credentials_screen/models/credentials_model.dart +++ /dev/null @@ -1,22 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; - -/// This class defines the variables used in the [credentials_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class CredentialsModel extends Equatable { - UserRegistrationSheet userRegistrationSheet; - - CredentialsModel({required this.userRegistrationSheet}); - - CredentialsModel copyWith({UserRegistrationSheet? userRegistrationSheet}) { - return CredentialsModel( - userRegistrationSheet: - userRegistrationSheet ?? this.userRegistrationSheet, - ); - } - - @override - List get props => [userRegistrationSheet]; -} diff --git a/lib/presentation/registration/date_of_birth_screen/bloc/date_of_birth_bloc.dart b/lib/presentation/registration/date_of_birth_screen/bloc/date_of_birth_bloc.dart deleted file mode 100644 index 78dec540..00000000 --- a/lib/presentation/registration/date_of_birth_screen/bloc/date_of_birth_bloc.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/date_of_birth_screen/models/date_of_birth_model.dart'; -part 'date_of_birth_event.dart'; -part 'date_of_birth_state.dart'; - -/// A bloc that manages the state of a DateOfBirth according to the event that is dispatched to it. -class DateOfBirthBloc extends Bloc { - DateOfBirthBloc(DateOfBirthState initialState) : super(initialState) { - on(_onInitialize); - } - - _onInitialize( - DateOfBirthInitialEvent event, - Emitter emit, - ) async {} -} diff --git a/lib/presentation/registration/date_of_birth_screen/bloc/date_of_birth_event.dart b/lib/presentation/registration/date_of_birth_screen/bloc/date_of_birth_event.dart deleted file mode 100644 index 0d6938b5..00000000 --- a/lib/presentation/registration/date_of_birth_screen/bloc/date_of_birth_event.dart +++ /dev/null @@ -1,16 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'date_of_birth_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///DateOfBirth widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class DateOfBirthEvent extends Equatable {} - -/// Event that is dispatched when the DateOfBirth widget is first created. -class DateOfBirthInitialEvent extends DateOfBirthEvent { - @override - List get props => []; -} diff --git a/lib/presentation/registration/date_of_birth_screen/bloc/date_of_birth_state.dart b/lib/presentation/registration/date_of_birth_screen/bloc/date_of_birth_state.dart deleted file mode 100644 index e54b82c6..00000000 --- a/lib/presentation/registration/date_of_birth_screen/bloc/date_of_birth_state.dart +++ /dev/null @@ -1,20 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'date_of_birth_bloc.dart'; - -/// Represents the state of DateOfBirth in the application. -class DateOfBirthState extends Equatable { - DateOfBirthState({this.dateOfBirthModelObj}); - - DateOfBirthModel? dateOfBirthModelObj; - - @override - List get props => [ - dateOfBirthModelObj, - ]; - DateOfBirthState copyWith({DateOfBirthModel? dateOfBirthModelObj}) { - return DateOfBirthState( - dateOfBirthModelObj: dateOfBirthModelObj ?? this.dateOfBirthModelObj, - ); - } -} diff --git a/lib/presentation/registration/date_of_birth_screen/models/date_of_birth_model.dart b/lib/presentation/registration/date_of_birth_screen/models/date_of_birth_model.dart deleted file mode 100644 index 121b10d6..00000000 --- a/lib/presentation/registration/date_of_birth_screen/models/date_of_birth_model.dart +++ /dev/null @@ -1,21 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; - -/// This class defines the variables used in the [date_of_birth_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class DateOfBirthModel extends Equatable { - UserRegistrationSheet userRegistrationSheet; - - DateOfBirthModel({required this.userRegistrationSheet}); - - DateOfBirthModel copyWith() { - return DateOfBirthModel( - userRegistrationSheet: userRegistrationSheet, - ); - } - - @override - List get props => [userRegistrationSheet]; -} diff --git a/lib/presentation/registration/favorite_foods_screen/bloc/favorite_foods_bloc.dart b/lib/presentation/registration/favorite_foods_screen/bloc/favorite_foods_bloc.dart deleted file mode 100644 index b9494911..00000000 --- a/lib/presentation/registration/favorite_foods_screen/bloc/favorite_foods_bloc.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/favorite_foods_screen/models/favorite_foods_model.dart'; -part 'favorite_foods_event.dart'; -part 'favorite_foods_state.dart'; - -/// A bloc that manages the state of a FavoriteFoods according to the event that is dispatched to it. -class FavoriteFoodsBloc extends Bloc { - FavoriteFoodsBloc(FavoriteFoodsState initialState) : super(initialState) { - on(_onInitialize); - } - - _onInitialize( - FavoriteFoodsInitialEvent event, - Emitter emit, - ) async { - emit(state.copyWith( - favoriteFoodsController: TextEditingController(), - unfavoriteFoodsController: TextEditingController(),),); - } -} diff --git a/lib/presentation/registration/favorite_foods_screen/bloc/favorite_foods_event.dart b/lib/presentation/registration/favorite_foods_screen/bloc/favorite_foods_event.dart deleted file mode 100644 index f930b8e0..00000000 --- a/lib/presentation/registration/favorite_foods_screen/bloc/favorite_foods_event.dart +++ /dev/null @@ -1,16 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'favorite_foods_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///FavoriteFoods widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class FavoriteFoodsEvent extends Equatable {} - -/// Event that is dispatched when the FavoriteFoods widget is first created. -class FavoriteFoodsInitialEvent extends FavoriteFoodsEvent { - @override - List get props => []; -} diff --git a/lib/presentation/registration/favorite_foods_screen/bloc/favorite_foods_state.dart b/lib/presentation/registration/favorite_foods_screen/bloc/favorite_foods_state.dart deleted file mode 100644 index aa4fc3b8..00000000 --- a/lib/presentation/registration/favorite_foods_screen/bloc/favorite_foods_state.dart +++ /dev/null @@ -1,39 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'favorite_foods_bloc.dart'; - -/// Represents the state of FavoriteFoods in the application. -class FavoriteFoodsState extends Equatable { - FavoriteFoodsState({ - this.favoriteFoodsController, - this.unfavoriteFoodsController, - this.favoriteFoodsModelObj, - }); - - TextEditingController? favoriteFoodsController; - - TextEditingController? unfavoriteFoodsController; - - FavoriteFoodsModel? favoriteFoodsModelObj; - - @override - List get props => [ - favoriteFoodsController, - unfavoriteFoodsController, - favoriteFoodsModelObj, - ]; - FavoriteFoodsState copyWith({ - TextEditingController? favoriteFoodsController, - TextEditingController? unfavoriteFoodsController, - FavoriteFoodsModel? favoriteFoodsModelObj, - }) { - return FavoriteFoodsState( - favoriteFoodsController: - favoriteFoodsController ?? this.favoriteFoodsController, - unfavoriteFoodsController: - unfavoriteFoodsController ?? this.unfavoriteFoodsController, - favoriteFoodsModelObj: - favoriteFoodsModelObj ?? this.favoriteFoodsModelObj, - ); - } -} diff --git a/lib/presentation/registration/favorite_foods_screen/models/favorite_foods_model.dart b/lib/presentation/registration/favorite_foods_screen/models/favorite_foods_model.dart deleted file mode 100644 index 3aeeee20..00000000 --- a/lib/presentation/registration/favorite_foods_screen/models/favorite_foods_model.dart +++ /dev/null @@ -1,20 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; - -/// This class defines the variables used in the [favorite_foods_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class FavoriteFoodsModel extends Equatable { - UserRegistrationSheet userRegistrationSheet; - FavoriteFoodsModel({required this.userRegistrationSheet}); - - FavoriteFoodsModel copyWith() { - return FavoriteFoodsModel( - userRegistrationSheet: userRegistrationSheet, - ); - } - - @override - List get props => [userRegistrationSheet]; -} diff --git a/lib/presentation/registration/favorite_sports_screen/bloc/favorite_sports_bloc.dart b/lib/presentation/registration/favorite_sports_screen/bloc/favorite_sports_bloc.dart deleted file mode 100644 index 7857f8b4..00000000 --- a/lib/presentation/registration/favorite_sports_screen/bloc/favorite_sports_bloc.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/favorite_sports_screen/models/favorite_sports_model.dart'; -part 'favorite_sports_event.dart'; -part 'favorite_sports_state.dart'; - -/// A bloc that manages the state of a FavoriteSports according to the event that is dispatched to it. -class FavoriteSportsBloc - extends Bloc { - FavoriteSportsBloc(FavoriteSportsState initialState) : super(initialState) { - on(_onInitialize); - } - - _onInitialize( - FavoriteSportsInitialEvent event, - Emitter emit, - ) async { - emit(state.copyWith(enterinformationController: TextEditingController())); - } -} diff --git a/lib/presentation/registration/favorite_sports_screen/bloc/favorite_sports_event.dart b/lib/presentation/registration/favorite_sports_screen/bloc/favorite_sports_event.dart deleted file mode 100644 index ae9a018f..00000000 --- a/lib/presentation/registration/favorite_sports_screen/bloc/favorite_sports_event.dart +++ /dev/null @@ -1,16 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'favorite_sports_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///FavoriteSports widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class FavoriteSportsEvent extends Equatable {} - -/// Event that is dispatched when the FavoriteSports widget is first created. -class FavoriteSportsInitialEvent extends FavoriteSportsEvent { - @override - List get props => []; -} diff --git a/lib/presentation/registration/favorite_sports_screen/bloc/favorite_sports_state.dart b/lib/presentation/registration/favorite_sports_screen/bloc/favorite_sports_state.dart deleted file mode 100644 index c44cb2ad..00000000 --- a/lib/presentation/registration/favorite_sports_screen/bloc/favorite_sports_state.dart +++ /dev/null @@ -1,32 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'favorite_sports_bloc.dart'; - -/// Represents the state of FavoriteSports in the application. -class FavoriteSportsState extends Equatable { - FavoriteSportsState({ - this.enterinformationController, - this.favoriteSportsModelObj, - }); - - TextEditingController? enterinformationController; - - FavoriteSportsModel? favoriteSportsModelObj; - - @override - List get props => [ - enterinformationController, - favoriteSportsModelObj, - ]; - FavoriteSportsState copyWith({ - TextEditingController? enterinformationController, - FavoriteSportsModel? favoriteSportsModelObj, - }) { - return FavoriteSportsState( - enterinformationController: - enterinformationController ?? this.enterinformationController, - favoriteSportsModelObj: - favoriteSportsModelObj ?? this.favoriteSportsModelObj, - ); - } -} diff --git a/lib/presentation/registration/favorite_sports_screen/models/favorite_sports_model.dart b/lib/presentation/registration/favorite_sports_screen/models/favorite_sports_model.dart deleted file mode 100644 index 25481701..00000000 --- a/lib/presentation/registration/favorite_sports_screen/models/favorite_sports_model.dart +++ /dev/null @@ -1,20 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; - -/// This class defines the variables used in the [favorite_sports_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class FavoriteSportsModel extends Equatable { - UserRegistrationSheet userRegistrationSheet; - FavoriteSportsModel({required this.userRegistrationSheet}); - - FavoriteSportsModel copyWith() { - return FavoriteSportsModel( - userRegistrationSheet: userRegistrationSheet, - ); - } - - @override - List get props => [userRegistrationSheet]; -} diff --git a/lib/presentation/registration/gender_screen/bloc/gender_bloc.dart b/lib/presentation/registration/gender_screen/bloc/gender_bloc.dart deleted file mode 100644 index fe305815..00000000 --- a/lib/presentation/registration/gender_screen/bloc/gender_bloc.dart +++ /dev/null @@ -1,29 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/gender_screen/models/gender_model.dart'; -part 'gender_event.dart'; -part 'gender_state.dart'; - -/// A bloc that manages the state of a Gender according to the event that is dispatched to it. -class GenderBloc extends Bloc { - GenderBloc(GenderState initialState) : super(initialState) { - on(_onInitialize); - on(_genderSelect); - } - - _onInitialize( - GenderInitialEvent event, - Emitter emit, - ) async { - emit(state.copyWith(genderModelObj: state.genderModelObj)); - } - - _genderSelect( - GenderSelectEvent event, - Emitter emit, - ) { - emit(state.copyWith(selectedRadioValue: event.value)); - // state.genderModelObj?.userRegistrationSheet.gender = event.value; - } -} diff --git a/lib/presentation/registration/gender_screen/bloc/gender_event.dart b/lib/presentation/registration/gender_screen/bloc/gender_event.dart deleted file mode 100644 index f6b9f69c..00000000 --- a/lib/presentation/registration/gender_screen/bloc/gender_event.dart +++ /dev/null @@ -1,26 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'gender_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///Gender widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class GenderEvent extends Equatable {} - -class GenderInitialEvent extends GenderEvent { - @override - List get props => []; -} - -class GenderSelectEvent extends GenderEvent { - GenderSelectEvent({required this.value}); - - String value; - - @override - List get props => [ - value, - ]; -} diff --git a/lib/presentation/registration/gender_screen/bloc/gender_state.dart b/lib/presentation/registration/gender_screen/bloc/gender_state.dart deleted file mode 100644 index 996082e8..00000000 --- a/lib/presentation/registration/gender_screen/bloc/gender_state.dart +++ /dev/null @@ -1,30 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'gender_bloc.dart'; - -/// Represents the state of Gender in the application. -class GenderState extends Equatable { - GenderState({ - this.selectedRadioValue, - this.genderModelObj, - }); - - String? selectedRadioValue; - - GenderModel? genderModelObj; - - @override - List get props => [ - selectedRadioValue, - genderModelObj, - ]; - GenderState copyWith({ - String? selectedRadioValue, - GenderModel? genderModelObj, - }) { - return GenderState( - selectedRadioValue: selectedRadioValue ?? this.selectedRadioValue, - genderModelObj: genderModelObj ?? this.genderModelObj, - ); - } -} diff --git a/lib/presentation/registration/gender_screen/models/gender_model.dart b/lib/presentation/registration/gender_screen/models/gender_model.dart deleted file mode 100644 index 69779b41..00000000 --- a/lib/presentation/registration/gender_screen/models/gender_model.dart +++ /dev/null @@ -1,20 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; - -/// This class defines the variables used in the [gender_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class GenderModel extends Equatable { - UserRegistrationSheet userRegistrationSheet; - GenderModel({required this.userRegistrationSheet}); - - GenderModel copyWith({UserRegistrationSheet? userRegistrationSheet, gender}) { - return GenderModel( - userRegistrationSheet: - userRegistrationSheet ?? this.userRegistrationSheet,); - } - - @override - List get props => [userRegistrationSheet]; -} diff --git a/lib/presentation/registration/height_screen/bloc/height_bloc.dart b/lib/presentation/registration/height_screen/bloc/height_bloc.dart deleted file mode 100644 index 223f7194..00000000 --- a/lib/presentation/registration/height_screen/bloc/height_bloc.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/height_screen/models/height_model.dart'; -part 'height_event.dart'; -part 'height_state.dart'; - -/// A bloc that manages the state of a Height according to the event that is dispatched to it. -class HeightBloc extends Bloc { - HeightBloc(HeightState initialState) : super(initialState) { - on(_onInitialize); - } - - _onInitialize( - HeightInitialEvent event, - Emitter emit, - ) async { - emit(state.copyWith( - heightModelObj: state.heightModelObj?.copyWith(), - heightController: state.heightController,),); - } -} diff --git a/lib/presentation/registration/height_screen/bloc/height_event.dart b/lib/presentation/registration/height_screen/bloc/height_event.dart deleted file mode 100644 index 1d65dd82..00000000 --- a/lib/presentation/registration/height_screen/bloc/height_event.dart +++ /dev/null @@ -1,16 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'height_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///Height widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class HeightEvent extends Equatable {} - -/// Event that is dispatched when the Height widget is first created. -class HeightInitialEvent extends HeightEvent { - @override - List get props => []; -} diff --git a/lib/presentation/registration/height_screen/bloc/height_state.dart b/lib/presentation/registration/height_screen/bloc/height_state.dart deleted file mode 100644 index aa10592f..00000000 --- a/lib/presentation/registration/height_screen/bloc/height_state.dart +++ /dev/null @@ -1,30 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'height_bloc.dart'; - -/// Represents the state of Height in the application. -class HeightState extends Equatable { - HeightState({ - this.heightController, - this.heightModelObj, - }); - - TextEditingController? heightController; - - HeightModel? heightModelObj; - - @override - List get props => [ - heightController, - heightModelObj, - ]; - HeightState copyWith({ - TextEditingController? heightController, - HeightModel? heightModelObj, - }) { - return HeightState( - heightController: heightController ?? this.heightController, - heightModelObj: heightModelObj ?? this.heightModelObj, - ); - } -} diff --git a/lib/presentation/registration/height_screen/models/height_model.dart b/lib/presentation/registration/height_screen/models/height_model.dart deleted file mode 100644 index 3a56580a..00000000 --- a/lib/presentation/registration/height_screen/models/height_model.dart +++ /dev/null @@ -1,25 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; -import 'package:eatvio_app/data/models/selectionPopupModel/selection_popup_model.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; - -/// This class defines the variables used in the [height_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class HeightModel extends Equatable { - UserRegistrationSheet userRegistrationSheet; - HeightModel( - {this.dropdownItemList = const [], required this.userRegistrationSheet,}); - - List dropdownItemList; - - HeightModel copyWith({List? dropdownItemList}) { - return HeightModel( - userRegistrationSheet: userRegistrationSheet, - dropdownItemList: dropdownItemList ?? this.dropdownItemList, - ); - } - - @override - List get props => [dropdownItemList, userRegistrationSheet]; -} diff --git a/lib/presentation/registration/language_select_screen/bloc/language_select_bloc.dart b/lib/presentation/registration/language_select_screen/bloc/language_select_bloc.dart deleted file mode 100644 index 76047173..00000000 --- a/lib/presentation/registration/language_select_screen/bloc/language_select_bloc.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/language_select_screen/models/language_select_model.dart'; - -part 'language_select_event.dart'; - -part 'language_select_state.dart'; - -/// A bloc that manages the state of a LanguageSelect according to the event that is dispatched to it. -class LanguageSelectBloc extends Bloc { - LanguageSelectBloc(LanguageSelectState initialState) : super(initialState) { - on(_onInitialize); - on(_changeDropDown); - } - - _onInitialize(LanguageSelectInitialEvent event, Emitter emit) async { - emit( - state.copyWith( - languageSelectModelObj: state.languageSelectModelObj?.copyWith(dropdownItemList: fillDropdownItemList()), - ), - ); - } - - _changeDropDown(ChangeDropDownEvent event, Emitter emit) { - emit(state.copyWith(selectedDropDownValue: event.value)); - // state.languageSelectModelObj?.userRegistrationSheet.lang = event.value.title; - } - - List fillDropdownItemList() { - return [ - SelectionPopupModel(id: 1, title: "Русский", isSelected: true), - ]; - } -} diff --git a/lib/presentation/registration/language_select_screen/bloc/language_select_event.dart b/lib/presentation/registration/language_select_screen/bloc/language_select_event.dart deleted file mode 100644 index 5c39a950..00000000 --- a/lib/presentation/registration/language_select_screen/bloc/language_select_event.dart +++ /dev/null @@ -1,28 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'language_select_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///LanguageSelect widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class LanguageSelectEvent extends Equatable {} - -/// Event that is dispatched when the LanguageSelect widget is first created. -class LanguageSelectInitialEvent extends LanguageSelectEvent { - @override - List get props => []; -} - -///event for dropdown selection -class ChangeDropDownEvent extends LanguageSelectEvent { - ChangeDropDownEvent({required this.value}); - - SelectionPopupModel value; - - @override - List get props => [ - value, - ]; -} diff --git a/lib/presentation/registration/language_select_screen/bloc/language_select_state.dart b/lib/presentation/registration/language_select_screen/bloc/language_select_state.dart deleted file mode 100644 index 602a4adc..00000000 --- a/lib/presentation/registration/language_select_screen/bloc/language_select_state.dart +++ /dev/null @@ -1,32 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'language_select_bloc.dart'; - -/// Represents the state of LanguageSelect in the application. -class LanguageSelectState extends Equatable { - LanguageSelectState({ - this.selectedDropDownValue, - this.languageSelectModelObj, - }); - - SelectionPopupModel? selectedDropDownValue; - - LanguageSelectModel? languageSelectModelObj; - - @override - List get props => [ - selectedDropDownValue, - languageSelectModelObj, - ]; - LanguageSelectState copyWith({ - SelectionPopupModel? selectedDropDownValue, - LanguageSelectModel? languageSelectModelObj, - }) { - return LanguageSelectState( - selectedDropDownValue: - selectedDropDownValue ?? this.selectedDropDownValue, - languageSelectModelObj: - languageSelectModelObj ?? this.languageSelectModelObj, - ); - } -} diff --git a/lib/presentation/registration/language_select_screen/models/language_select_model.dart b/lib/presentation/registration/language_select_screen/models/language_select_model.dart deleted file mode 100644 index c337c55e..00000000 --- a/lib/presentation/registration/language_select_screen/models/language_select_model.dart +++ /dev/null @@ -1,51 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; -import 'package:eatvio_app/data/models/selectionPopupModel/selection_popup_model.dart'; - -/// This class defines the variables used in the [language_select_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class LanguageSelectModel extends Equatable { - LanguageSelectModel({this.dropdownItemList = const []}); - - UserRegistrationSheet userRegistrationSheet = UserRegistrationSheet( - name: '', - firstName: '', - lastName: '', - email: '', - password: '', - passwordConfirmation: '', - termsAccepted: 'accepted', - birthdate: DateTime.now().toString(), - gender: '', - country: '', - city: '', - lang: '', - weight: '', - height: '', - chestCircumference: '', - waistCircumference: '', - hipCircumference: '', - bloodPressureUp: '', - bloodPressureDown: '', - hasHypo: '', - hasHyper: '', - aboutAllergy: '', - aboutTakingPils: '', - aboutSportHobbies: '', - favoriteFoods: '', - unfavoriteFoods: '', - additionalInfo: '', - ); - List dropdownItemList; - - LanguageSelectModel copyWith({List? dropdownItemList}) { - return LanguageSelectModel( - dropdownItemList: dropdownItemList ?? this.dropdownItemList, - ); - } - - @override - List get props => [dropdownItemList]; -} diff --git a/lib/presentation/registration/medicine_intake_screen/bloc/medicine_intake_bloc.dart b/lib/presentation/registration/medicine_intake_screen/bloc/medicine_intake_bloc.dart deleted file mode 100644 index bd878765..00000000 --- a/lib/presentation/registration/medicine_intake_screen/bloc/medicine_intake_bloc.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/medicine_intake_screen/models/medicine_intake_model.dart'; -part 'medicine_intake_event.dart'; -part 'medicine_intake_state.dart'; - -/// A bloc that manages the state of a MedicineIntake according to the event that is dispatched to it. -class MedicineIntakeBloc - extends Bloc { - MedicineIntakeBloc(MedicineIntakeState initialState) : super(initialState) { - on(_onInitialize); - } - - _onInitialize( - MedicineIntakeInitialEvent event, - Emitter emit, - ) async { - emit(state.copyWith(enterInformationController: TextEditingController())); - } -} diff --git a/lib/presentation/registration/medicine_intake_screen/bloc/medicine_intake_event.dart b/lib/presentation/registration/medicine_intake_screen/bloc/medicine_intake_event.dart deleted file mode 100644 index 0300b286..00000000 --- a/lib/presentation/registration/medicine_intake_screen/bloc/medicine_intake_event.dart +++ /dev/null @@ -1,16 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'medicine_intake_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///MedicineIntake widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class MedicineIntakeEvent extends Equatable {} - -/// Event that is dispatched when the MedicineIntake widget is first created. -class MedicineIntakeInitialEvent extends MedicineIntakeEvent { - @override - List get props => []; -} diff --git a/lib/presentation/registration/medicine_intake_screen/bloc/medicine_intake_state.dart b/lib/presentation/registration/medicine_intake_screen/bloc/medicine_intake_state.dart deleted file mode 100644 index 8d7958f6..00000000 --- a/lib/presentation/registration/medicine_intake_screen/bloc/medicine_intake_state.dart +++ /dev/null @@ -1,32 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'medicine_intake_bloc.dart'; - -/// Represents the state of MedicineIntake in the application. -class MedicineIntakeState extends Equatable { - MedicineIntakeState({ - this.enterInformationController, - this.medicineIntakeModelObj, - }); - - TextEditingController? enterInformationController; - - MedicineIntakeModel? medicineIntakeModelObj; - - @override - List get props => [ - enterInformationController, - medicineIntakeModelObj, - ]; - MedicineIntakeState copyWith({ - TextEditingController? enterInformationController, - MedicineIntakeModel? medicineIntakeModelObj, - }) { - return MedicineIntakeState( - enterInformationController: - enterInformationController ?? this.enterInformationController, - medicineIntakeModelObj: - medicineIntakeModelObj ?? this.medicineIntakeModelObj, - ); - } -} diff --git a/lib/presentation/registration/medicine_intake_screen/models/medicine_intake_model.dart b/lib/presentation/registration/medicine_intake_screen/models/medicine_intake_model.dart deleted file mode 100644 index f6634de4..00000000 --- a/lib/presentation/registration/medicine_intake_screen/models/medicine_intake_model.dart +++ /dev/null @@ -1,20 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; - -/// This class defines the variables used in the [medicine_intake_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class MedicineIntakeModel extends Equatable { - UserRegistrationSheet userRegistrationSheet; - MedicineIntakeModel({required this.userRegistrationSheet}); - - MedicineIntakeModel copyWith() { - return MedicineIntakeModel( - userRegistrationSheet: userRegistrationSheet, - ); - } - - @override - List get props => [userRegistrationSheet]; -} diff --git a/lib/presentation/registration/name_screen/bloc/name_bloc.dart b/lib/presentation/registration/name_screen/bloc/name_bloc.dart deleted file mode 100644 index e4a51431..00000000 --- a/lib/presentation/registration/name_screen/bloc/name_bloc.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/name_screen/models/name_model.dart'; -part 'name_event.dart'; -part 'name_state.dart'; - -/// A bloc that manages the state of a Name according to the event that is dispatched to it. -class NameBloc extends Bloc { - NameBloc(NameState initialState) : super(initialState) { - on(_onInitialize); - } - - _onInitialize( - NameInitialEvent event, - Emitter emit, - ) async { - emit(state.copyWith( - firstNameController: TextEditingController(), - lastNameController: TextEditingController(),),); - } -} diff --git a/lib/presentation/registration/name_screen/bloc/name_event.dart b/lib/presentation/registration/name_screen/bloc/name_event.dart deleted file mode 100644 index 7e102994..00000000 --- a/lib/presentation/registration/name_screen/bloc/name_event.dart +++ /dev/null @@ -1,16 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'name_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///Name widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class NameEvent extends Equatable {} - -/// Event that is dispatched when the Name widget is first created. -class NameInitialEvent extends NameEvent { - @override - List get props => []; -} diff --git a/lib/presentation/registration/name_screen/bloc/name_state.dart b/lib/presentation/registration/name_screen/bloc/name_state.dart deleted file mode 100644 index b3e0980b..00000000 --- a/lib/presentation/registration/name_screen/bloc/name_state.dart +++ /dev/null @@ -1,36 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'name_bloc.dart'; - -/// Represents the state of Name in the application. -class NameState extends Equatable { - NameState({ - this.firstNameController, - this.lastNameController, - this.nameModelObj, - }); - - TextEditingController? firstNameController; - - TextEditingController? lastNameController; - - NameModel? nameModelObj; - - @override - List get props => [ - firstNameController, - lastNameController, - nameModelObj, - ]; - NameState copyWith({ - TextEditingController? firstNameController, - TextEditingController? lastNameController, - NameModel? nameModelObj, - }) { - return NameState( - firstNameController: firstNameController ?? this.firstNameController, - lastNameController: lastNameController ?? this.lastNameController, - nameModelObj: nameModelObj ?? this.nameModelObj, - ); - } -} diff --git a/lib/presentation/registration/name_screen/models/name_model.dart b/lib/presentation/registration/name_screen/models/name_model.dart deleted file mode 100644 index 6fa44b07..00000000 --- a/lib/presentation/registration/name_screen/models/name_model.dart +++ /dev/null @@ -1,21 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; - -/// This class defines the variables used in the [name_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class NameModel extends Equatable { - UserRegistrationSheet userRegistrationSheet; - NameModel({required this.userRegistrationSheet}); - - NameModel copyWith({UserRegistrationSheet? userRegistrationSheet}) { - return NameModel( - userRegistrationSheet: - userRegistrationSheet ?? this.userRegistrationSheet, - ); - } - - @override - List get props => []; -} diff --git a/lib/presentation/registration/splash_screen/bloc/splash_bloc.dart b/lib/presentation/registration/splash_screen/bloc/splash_bloc.dart deleted file mode 100644 index bdd396f0..00000000 --- a/lib/presentation/registration/splash_screen/bloc/splash_bloc.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:eatvio_app/app_router.dart'; -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import 'package:go_router/go_router.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/splash_screen/models/splash_model.dart'; - -part 'splash_event.dart'; - -part 'splash_state.dart'; - -/// A bloc that manages the state of a Splash according to the event that is dispatched to it. -class SplashBloc extends Bloc { - SplashBloc(SplashState initialState) : super(initialState) { - on(_onInitialize); - } - - _onInitialize( - SplashInitialEvent event, - Emitter emit, - ) async { - Future.delayed(const Duration(milliseconds: 3000), () { - AppRouter.navigatorKey.currentContext?.goNamed('myProfileScreen'); - }); - } -} diff --git a/lib/presentation/registration/splash_screen/bloc/splash_event.dart b/lib/presentation/registration/splash_screen/bloc/splash_event.dart deleted file mode 100644 index a78a25bb..00000000 --- a/lib/presentation/registration/splash_screen/bloc/splash_event.dart +++ /dev/null @@ -1,16 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'splash_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///Splash widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class SplashEvent extends Equatable {} - -/// Event that is dispatched when the Splash widget is first created. -class SplashInitialEvent extends SplashEvent { - @override - List get props => []; -} diff --git a/lib/presentation/registration/splash_screen/bloc/splash_state.dart b/lib/presentation/registration/splash_screen/bloc/splash_state.dart deleted file mode 100644 index e47ce03e..00000000 --- a/lib/presentation/registration/splash_screen/bloc/splash_state.dart +++ /dev/null @@ -1,20 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'splash_bloc.dart'; - -/// Represents the state of Splash in the application. -class SplashState extends Equatable { - SplashState({this.splashModelObj}); - - SplashModel? splashModelObj; - - @override - List get props => [ - splashModelObj, - ]; - SplashState copyWith({SplashModel? splashModelObj}) { - return SplashState( - splashModelObj: splashModelObj ?? this.splashModelObj, - ); - } -} diff --git a/lib/presentation/registration/splash_screen/models/splash_model.dart b/lib/presentation/registration/splash_screen/models/splash_model.dart deleted file mode 100644 index 6ad8f8f1..00000000 --- a/lib/presentation/registration/splash_screen/models/splash_model.dart +++ /dev/null @@ -1,16 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; - -/// This class defines the variables used in the [splash_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class SplashModel extends Equatable { - SplashModel(); - - SplashModel copyWith() { - return SplashModel(); - } - - @override - List get props => []; -} diff --git a/lib/presentation/registration/splash_screen/splash_screen.dart b/lib/presentation/registration/splash_screen/splash_screen.dart deleted file mode 100644 index f8355f03..00000000 --- a/lib/presentation/registration/splash_screen/splash_screen.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'bloc/splash_bloc.dart'; -import 'models/splash_model.dart'; -import 'package:eatvio_app/core/app_export.dart'; -import 'package:flutter/material.dart'; - -class SplashScreen extends StatelessWidget { - const SplashScreen({Key? key}) : super(key: key); - - static Widget builder(BuildContext context) { - return BlocProvider( - create: (context) => - SplashBloc(SplashState(splashModelObj: SplashModel())) - ..add(SplashInitialEvent()), - child: SplashScreen(),); - } - - @override - Widget build(BuildContext context) { - mediaQueryData = MediaQuery.of(context); - return BlocBuilder(builder: (context, state) { - return SafeArea( - child: Scaffold( - body: SizedBox( - width: double.maxFinite, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox(height: 16.v), - CustomImageView( - imagePath: ImageConstant.img2456927096976, - height: 137.adaptSize, - width: 137.adaptSize,), - ],),),),); - },); - } -} diff --git a/lib/presentation/registration/weight_screen/bloc/weight_bloc.dart b/lib/presentation/registration/weight_screen/bloc/weight_bloc.dart deleted file mode 100644 index f03c8c3b..00000000 --- a/lib/presentation/registration/weight_screen/bloc/weight_bloc.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; -import '/core/app_export.dart'; -import 'package:eatvio_app/presentation/registration/weight_screen/models/weight_model.dart'; -part 'weight_event.dart'; -part 'weight_state.dart'; - -/// A bloc that manages the state of a Weight according to the event that is dispatched to it. -class WeightBloc extends Bloc { - WeightBloc(WeightState initialState) : super(initialState) { - on(_onInitialize); - } - - _onInitialize( - WeightInitialEvent event, - Emitter emit, - ) async { - emit(state.copyWith( - weightModelObj: state.weightModelObj?.copyWith(), - weightController: state.weightController,),); - } -} diff --git a/lib/presentation/registration/weight_screen/bloc/weight_event.dart b/lib/presentation/registration/weight_screen/bloc/weight_event.dart deleted file mode 100644 index 1b554c5e..00000000 --- a/lib/presentation/registration/weight_screen/bloc/weight_event.dart +++ /dev/null @@ -1,16 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'weight_bloc.dart'; - -/// Abstract class for all events that can be dispatched from the -///Weight widget. -/// -/// Events must be immutable and implement the [Equatable] interface. -@immutable -abstract class WeightEvent extends Equatable {} - -/// Event that is dispatched when the Weight widget is first created. -class WeightInitialEvent extends WeightEvent { - @override - List get props => []; -} diff --git a/lib/presentation/registration/weight_screen/bloc/weight_state.dart b/lib/presentation/registration/weight_screen/bloc/weight_state.dart deleted file mode 100644 index 5d782dfd..00000000 --- a/lib/presentation/registration/weight_screen/bloc/weight_state.dart +++ /dev/null @@ -1,30 +0,0 @@ -// ignore_for_file: must_be_immutable - -part of 'weight_bloc.dart'; - -/// Represents the state of Weight in the application. -class WeightState extends Equatable { - WeightState({ - this.weightController, - this.weightModelObj, - }); - - TextEditingController? weightController; - - WeightModel? weightModelObj; - - @override - List get props => [ - weightController, - weightModelObj, - ]; - WeightState copyWith({ - TextEditingController? weightController, - WeightModel? weightModelObj, - }) { - return WeightState( - weightController: weightController ?? this.weightController, - weightModelObj: weightModelObj ?? this.weightModelObj, - ); - } -} diff --git a/lib/presentation/registration/weight_screen/models/weight_model.dart b/lib/presentation/registration/weight_screen/models/weight_model.dart deleted file mode 100644 index d5edd078..00000000 --- a/lib/presentation/registration/weight_screen/models/weight_model.dart +++ /dev/null @@ -1,25 +0,0 @@ -// ignore_for_file: must_be_immutable - -import 'package:equatable/equatable.dart'; -import 'package:eatvio_app/data/models/selectionPopupModel/selection_popup_model.dart'; -import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; - -/// This class defines the variables used in the [weight_screen], -/// and is typically used to hold data that is passed between different parts of the application. -class WeightModel extends Equatable { - UserRegistrationSheet userRegistrationSheet; - WeightModel( - {this.dropdownItemList = const [], required this.userRegistrationSheet,}); - - List dropdownItemList; - - WeightModel copyWith({List? dropdownItemList}) { - return WeightModel( - userRegistrationSheet: userRegistrationSheet, - dropdownItemList: dropdownItemList ?? this.dropdownItemList, - ); - } - - @override - List get props => [dropdownItemList, userRegistrationSheet]; -}