diff --git a/devtools_options.yaml b/devtools_options.yaml new file mode 100644 index 0000000..7e7e7f6 --- /dev/null +++ b/devtools_options.yaml @@ -0,0 +1 @@ +extensions: diff --git a/lib/presentation/additional_information_screen/additional_information_screen.dart b/lib/presentation/additional_information_screen/additional_information_screen.dart index c377801..a75d2ee 100644 --- a/lib/presentation/additional_information_screen/additional_information_screen.dart +++ b/lib/presentation/additional_information_screen/additional_information_screen.dart @@ -4,7 +4,7 @@ import 'package:eatvio_app/core/app_export.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart'; import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart'; -import 'package:eatvio_app/widgets/custom_outlined_button.dart'; +import 'package:eatvio_app/widgets/next_step_button.dart'; import 'package:eatvio_app/widgets/custom_text_form_field.dart'; import 'package:flutter/material.dart'; @@ -58,7 +58,7 @@ class _AdditionalInformationScreenState SizedBox(height: 73.v), _buildTextFormField(context), Spacer(), - CustomOutlinedButton( + NextStepButton( text: "finish".tr.toUpperCase(), buttonStyle: CustomButtonStyles.outlinePrimaryTL15, onPressed: () { diff --git a/lib/presentation/allergies_screen/allergies_screen.dart b/lib/presentation/allergies_screen/allergies_screen.dart index 5ea99b1..fa9da4d 100644 --- a/lib/presentation/allergies_screen/allergies_screen.dart +++ b/lib/presentation/allergies_screen/allergies_screen.dart @@ -4,7 +4,7 @@ import 'package:eatvio_app/core/app_export.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart'; import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart'; -import 'package:eatvio_app/widgets/custom_outlined_button.dart'; +import 'package:eatvio_app/widgets/next_step_button.dart'; import 'package:eatvio_app/widgets/custom_text_form_field.dart'; import 'package:flutter/material.dart'; @@ -57,7 +57,7 @@ class _AllergiesScreenState extends State { Spacer(flex: 36), _buildTextFormField(context), Spacer(flex: 63), - CustomOutlinedButton( + NextStepButton( text: "continue".tr.toUpperCase(), buttonStyle: CustomButtonStyles.outlinePrimaryTL15, onPressed: () { diff --git a/lib/presentation/blood_pressure_screen/blood_pressure_screen.dart b/lib/presentation/blood_pressure_screen/blood_pressure_screen.dart index b005a3b..81ec7ea 100644 --- a/lib/presentation/blood_pressure_screen/blood_pressure_screen.dart +++ b/lib/presentation/blood_pressure_screen/blood_pressure_screen.dart @@ -5,7 +5,7 @@ import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart'; import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart'; import 'package:eatvio_app/widgets/custom_drop_down.dart'; -import 'package:eatvio_app/widgets/custom_outlined_button.dart'; +import 'package:eatvio_app/widgets/next_step_button.dart'; import 'package:eatvio_app/widgets/custom_text_form_field.dart'; import 'package:flutter/material.dart'; @@ -160,7 +160,7 @@ class _BloodPressureScreenState extends State { }); })), Spacer(), - CustomOutlinedButton( + NextStepButton( text: "continue".tr.toUpperCase(), margin: EdgeInsets.symmetric(horizontal: 4.h), buttonStyle: CustomButtonStyles.outlinePrimaryTL15, diff --git a/lib/presentation/body_circumferences_screen/body_circumferences_screen.dart b/lib/presentation/body_circumferences_screen/body_circumferences_screen.dart index 3ad5107..aee3e4a 100644 --- a/lib/presentation/body_circumferences_screen/body_circumferences_screen.dart +++ b/lib/presentation/body_circumferences_screen/body_circumferences_screen.dart @@ -4,7 +4,7 @@ import 'package:eatvio_app/core/app_export.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart'; import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart'; -import 'package:eatvio_app/widgets/custom_outlined_button.dart'; +import 'package:eatvio_app/widgets/next_step_button.dart'; import 'package:eatvio_app/widgets/custom_text_form_field.dart'; import 'package:flutter/material.dart'; @@ -93,7 +93,7 @@ class _BodyCircumferencesScreenState extends State { textInputAction: TextInputAction.done); }), Spacer(), - CustomOutlinedButton( + NextStepButton( text: "continue".tr.toUpperCase(), buttonStyle: CustomButtonStyles.outlinePrimaryTL15, onPressed: () { diff --git a/lib/presentation/city_of_living_screen/city_of_living_screen.dart b/lib/presentation/city_of_living_screen/city_of_living_screen.dart index 60650bf..37b2454 100644 --- a/lib/presentation/city_of_living_screen/city_of_living_screen.dart +++ b/lib/presentation/city_of_living_screen/city_of_living_screen.dart @@ -5,7 +5,7 @@ import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart'; import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart'; import 'package:eatvio_app/widgets/custom_drop_down.dart'; -import 'package:eatvio_app/widgets/custom_outlined_button.dart'; +import 'package:eatvio_app/widgets/next_step_button.dart'; import 'package:flutter/material.dart'; class CityOfLivingScreen extends StatelessWidget { @@ -99,7 +99,7 @@ class CityOfLivingScreen extends StatelessWidget { }); }), Spacer(flex: 65), - CustomOutlinedButton( + NextStepButton( text: "continue".tr.toUpperCase(), buttonStyle: CustomButtonStyles.outlinePrimaryTL15, onPressed: () { diff --git a/lib/presentation/credentials_screen/bloc/credentials_bloc.dart b/lib/presentation/credentials_screen/bloc/credentials_bloc.dart index c62211e..6fab34b 100644 --- a/lib/presentation/credentials_screen/bloc/credentials_bloc.dart +++ b/lib/presentation/credentials_screen/bloc/credentials_bloc.dart @@ -16,7 +16,7 @@ class CredentialsBloc extends Bloc { Emitter emit, ) async { emit(state.copyWith( - emailController: TextEditingController(), + valueController: TextEditingController(), passwordController: TextEditingController(), passwordConfirmationController: TextEditingController())); } diff --git a/lib/presentation/credentials_screen/bloc/credentials_state.dart b/lib/presentation/credentials_screen/bloc/credentials_state.dart index 91cb663..2d50f0f 100644 --- a/lib/presentation/credentials_screen/bloc/credentials_state.dart +++ b/lib/presentation/credentials_screen/bloc/credentials_state.dart @@ -5,13 +5,13 @@ part of 'credentials_bloc.dart'; /// Represents the state of Credentials in the application. class CredentialsState extends Equatable { CredentialsState({ - this.emailController, + this.valueController, this.passwordController, this.passwordConfirmationController, this.credentialsModelObj, }); - TextEditingController? emailController; + TextEditingController? valueController; TextEditingController? passwordController; @@ -21,19 +21,19 @@ class CredentialsState extends Equatable { @override List get props => [ - emailController, + valueController, passwordController, passwordConfirmationController, credentialsModelObj, ]; CredentialsState copyWith({ - TextEditingController? emailController, + TextEditingController? valueController, TextEditingController? passwordController, TextEditingController? passwordConfirmationController, CredentialsModel? credentialsModelObj, }) { return CredentialsState( - emailController: emailController ?? this.emailController, + valueController: valueController ?? this.valueController, passwordController: passwordController ?? this.passwordController, passwordConfirmationController: passwordConfirmationController ?? this.passwordConfirmationController, diff --git a/lib/presentation/credentials_screen/credentials_screen.dart b/lib/presentation/credentials_screen/credentials_screen.dart index a68b47e..f7b297c 100644 --- a/lib/presentation/credentials_screen/credentials_screen.dart +++ b/lib/presentation/credentials_screen/credentials_screen.dart @@ -1,10 +1,12 @@ +import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; + import 'bloc/credentials_bloc.dart'; import 'models/credentials_model.dart'; import 'package:eatvio_app/core/app_export.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart'; import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart'; -import 'package:eatvio_app/widgets/custom_outlined_button.dart'; +import 'package:eatvio_app/widgets/next_step_button.dart'; import 'package:eatvio_app/widgets/custom_text_form_field.dart'; import 'package:flutter/material.dart'; @@ -55,10 +57,10 @@ class CredentialsScreen extends StatelessWidget { SizedBox(height: 3.v), BlocSelector( - selector: (state) => state.passwordController, - builder: (context, passwordController) { + selector: (state) => state.valueController, + builder: (context, valueController) { return CustomTextFormField( - controller: passwordController, + controller: valueController, textInputAction: TextInputAction.done); }), SizedBox(height: 19.v), @@ -66,11 +68,11 @@ class CredentialsScreen extends StatelessWidget { SizedBox(height: 5.v), BlocSelector( - selector: (state) => state.passwordConfirmationController, - builder: (context, passwordConfirmationController) { + selector: (state) => state.passwordController, + builder: (context, passwordController) { return CustomTextFormField( obscureText: true, - controller: passwordConfirmationController, + controller: passwordController, ); }), SizedBox(height: 21.v), @@ -79,15 +81,15 @@ class CredentialsScreen extends StatelessWidget { SizedBox(height: 3.v), BlocSelector( - selector: (state) => state.emailController, - builder: (context, emailController3) { + selector: (state) => state.passwordConfirmationController, + builder: (context, passwordConfirmationController) { return CustomTextFormField( obscureText: true, - controller: emailController3, + controller: passwordConfirmationController, textInputAction: TextInputAction.done); }), Spacer(), - CustomOutlinedButton( + NextStepButton( text: "continue".tr.toUpperCase(), buttonStyle: CustomButtonStyles.outlinePrimaryTL15, onPressed: () { diff --git a/lib/presentation/date_of_birth_screen/date_of_birth_screen.dart b/lib/presentation/date_of_birth_screen/date_of_birth_screen.dart index 32e7c48..18d4dcb 100644 --- a/lib/presentation/date_of_birth_screen/date_of_birth_screen.dart +++ b/lib/presentation/date_of_birth_screen/date_of_birth_screen.dart @@ -4,7 +4,7 @@ import 'package:eatvio_app/core/app_export.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart'; import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart'; -import 'package:eatvio_app/widgets/custom_outlined_button.dart'; +import 'package:eatvio_app/widgets/next_step_button.dart'; import 'package:flutter/material.dart'; class DateOfBirthScreen extends StatefulWidget { @@ -58,7 +58,7 @@ class _DateOfBirthScreenState extends State { Spacer(flex: 39), _buildDateInput(context), Spacer(flex: 60), - CustomOutlinedButton( + NextStepButton( text: "continue".tr.toUpperCase(), buttonStyle: CustomButtonStyles.outlinePrimaryTL15, onPressed: () { diff --git a/lib/presentation/favorite_foods_screen/favorite_foods_screen.dart b/lib/presentation/favorite_foods_screen/favorite_foods_screen.dart index 2ee032e..c96a03e 100644 --- a/lib/presentation/favorite_foods_screen/favorite_foods_screen.dart +++ b/lib/presentation/favorite_foods_screen/favorite_foods_screen.dart @@ -4,7 +4,7 @@ import 'package:eatvio_app/core/app_export.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart'; import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart'; -import 'package:eatvio_app/widgets/custom_outlined_button.dart'; +import 'package:eatvio_app/widgets/next_step_button.dart'; import 'package:eatvio_app/widgets/custom_text_form_field.dart'; import 'package:flutter/material.dart'; @@ -65,7 +65,7 @@ class _FavoriteFoodsScreenState extends State { SizedBox(height: 22.v), _buildTextFormField1(context), SizedBox(height: 27.v), - CustomOutlinedButton( + NextStepButton( text: "continue".tr.toUpperCase(), buttonStyle: CustomButtonStyles.outlinePrimaryTL15, onPressed: () { diff --git a/lib/presentation/favorite_sports_screen/favorite_sports_screen.dart b/lib/presentation/favorite_sports_screen/favorite_sports_screen.dart index 543a146..2db602c 100644 --- a/lib/presentation/favorite_sports_screen/favorite_sports_screen.dart +++ b/lib/presentation/favorite_sports_screen/favorite_sports_screen.dart @@ -4,7 +4,7 @@ import 'package:eatvio_app/core/app_export.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart'; import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart'; -import 'package:eatvio_app/widgets/custom_outlined_button.dart'; +import 'package:eatvio_app/widgets/next_step_button.dart'; import 'package:eatvio_app/widgets/custom_text_form_field.dart'; import 'package:flutter/material.dart'; @@ -60,7 +60,7 @@ class _FavoriteSportsScreenState extends State { Spacer(flex: 32), _buildTextFormFieldSection(context), Spacer(flex: 67), - CustomOutlinedButton( + NextStepButton( text: "continue".tr.toUpperCase(), buttonStyle: CustomButtonStyles.outlinePrimaryTL15, onPressed: () { diff --git a/lib/presentation/gender_screen/gender_screen.dart b/lib/presentation/gender_screen/gender_screen.dart index 94ea3c6..f1a6848 100644 --- a/lib/presentation/gender_screen/gender_screen.dart +++ b/lib/presentation/gender_screen/gender_screen.dart @@ -4,7 +4,7 @@ import 'package:eatvio_app/core/app_export.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart'; import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart'; -import 'package:eatvio_app/widgets/custom_outlined_button.dart'; +import 'package:eatvio_app/widgets/next_step_button.dart'; import 'package:flutter/material.dart'; enum Gender { male, female } @@ -92,7 +92,7 @@ class _GenderScreenState extends State { ), ), Spacer(flex: 66), - CustomOutlinedButton( + NextStepButton( text: "continue".tr.toUpperCase(), buttonStyle: CustomButtonStyles.outlinePrimaryTL15, onPressed: () { diff --git a/lib/presentation/height_screen/height_screen.dart b/lib/presentation/height_screen/height_screen.dart index 71144d4..b9f55e3 100644 --- a/lib/presentation/height_screen/height_screen.dart +++ b/lib/presentation/height_screen/height_screen.dart @@ -5,7 +5,7 @@ import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart'; import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart'; import 'package:eatvio_app/widgets/custom_drop_down.dart'; -import 'package:eatvio_app/widgets/custom_outlined_button.dart'; +import 'package:eatvio_app/widgets/next_step_button.dart'; import 'package:flutter/material.dart'; class HeightScreen extends StatefulWidget { @@ -83,7 +83,7 @@ class _HeightScreenState extends State { ]) ]), Spacer(), - CustomOutlinedButton( + NextStepButton( text: "continue".tr.toUpperCase(), buttonStyle: CustomButtonStyles.outlinePrimaryTL15, onPressed: () { diff --git a/lib/presentation/language_select_screen/bloc/language_select_bloc.dart b/lib/presentation/language_select_screen/bloc/language_select_bloc.dart index 07bdccf..e86c0c6 100644 --- a/lib/presentation/language_select_screen/bloc/language_select_bloc.dart +++ b/lib/presentation/language_select_screen/bloc/language_select_bloc.dart @@ -2,17 +2,13 @@ import 'package:equatable/equatable.dart'; import 'package:flutter/material.dart'; import '/core/app_export.dart'; import 'package:eatvio_app/presentation/language_select_screen/models/language_select_model.dart'; -import 'dart:convert'; 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 { - LanguageSelectModel languageSelectModel; - LanguageSelectBloc(LanguageSelectState initialState, - {required this.languageSelectModel}) - : super(initialState) { + LanguageSelectBloc(LanguageSelectState initialState) : super(initialState) { on(_onInitialize); on(_changeDropDown); } @@ -31,8 +27,9 @@ class LanguageSelectBloc Emitter emit, ) { emit(state.copyWith(selectedDropDownValue: event.value)); - languageSelectModel.userRegistrationSheet.lang = event.value.title; - print(json.encode(languageSelectModel.userRegistrationSheet.lang)); + state.languageSelectModelObj?.userRegistrationSheet.lang = + event.value.title; + print(state.languageSelectModelObj?.userRegistrationSheet.lang); } List fillDropdownItemList() { diff --git a/lib/presentation/language_select_screen/language_select_screen.dart b/lib/presentation/language_select_screen/language_select_screen.dart index 36bb6e7..0d1f3b9 100644 --- a/lib/presentation/language_select_screen/language_select_screen.dart +++ b/lib/presentation/language_select_screen/language_select_screen.dart @@ -2,7 +2,7 @@ import 'bloc/language_select_bloc.dart'; import 'models/language_select_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_outlined_button.dart'; +import 'package:eatvio_app/widgets/next_step_button.dart'; import 'package:eatvio_app/presentation/credentials_screen/models/credentials_model.dart'; import 'package:flutter/material.dart'; @@ -11,8 +11,7 @@ class LanguageSelectScreen extends StatelessWidget { static Widget builder(BuildContext context) { return BlocProvider( create: (context) => LanguageSelectBloc( - LanguageSelectState(languageSelectModelObj: LanguageSelectModel()), - languageSelectModel: LanguageSelectModel()) + LanguageSelectState(languageSelectModelObj: LanguageSelectModel())) ..add(LanguageSelectInitialEvent()), child: LanguageSelectScreen()); } @@ -59,7 +58,10 @@ class LanguageSelectScreen extends StatelessWidget { BlocSelector( selector: (state) => state.languageSelectModelObj, - builder: (context, languageSelectModelObj) { + builder: ( + context, + languageSelectModelObj, + ) { return CustomDropDown( icon: Container( margin: @@ -81,23 +83,31 @@ class LanguageSelectScreen extends StatelessWidget { }), Spacer(flex: 63) ])), - bottomNavigationBar: CustomOutlinedButton( - text: "continue".tr.toUpperCase(), - margin: EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v), - buttonStyle: CustomButtonStyles.outlinePrimaryTL15, - onPressed: () { - navigteToCredentials(context); - }))); + bottomNavigationBar: + BlocBuilder( + builder: (context, state) { + return NextStepButton( + text: "continue".tr.toUpperCase(), + margin: + EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v), + buttonStyle: CustomButtonStyles.outlinePrimaryTL15, + onPressed: () { + navigteToCredentials(context, state); + }); + }))); } /// Navigates to the genderScreen when the action is triggered. - navigteToCredentials(BuildContext context) { - LanguageSelectModel languageSelectModel = LanguageSelectModel(); - CredentialsModel credentialsModel = CredentialsModel( - userRegistrationSheet: languageSelectModel.userRegistrationSheet); - NavigatorService.pushNamed( - AppRoutes.credentialsScreen, - arguments: credentialsModel, - ); + navigteToCredentials(BuildContext context, LanguageSelectState state) { + if (state.languageSelectModelObj != null) { + CredentialsModel credentialsModel = CredentialsModel( + userRegistrationSheet: + state.languageSelectModelObj.userRegistrationSheet, + ); + NavigatorService.pushNamed( + AppRoutes.credentialsScreen, + arguments: credentialsModel, + ); + } } } diff --git a/lib/presentation/medicine_intake_screen/medicine_intake_screen.dart b/lib/presentation/medicine_intake_screen/medicine_intake_screen.dart index 7ca0eab..9382e8d 100644 --- a/lib/presentation/medicine_intake_screen/medicine_intake_screen.dart +++ b/lib/presentation/medicine_intake_screen/medicine_intake_screen.dart @@ -4,7 +4,7 @@ import 'package:eatvio_app/core/app_export.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart'; import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart'; -import 'package:eatvio_app/widgets/custom_outlined_button.dart'; +import 'package:eatvio_app/widgets/next_step_button.dart'; import 'package:eatvio_app/widgets/custom_text_form_field.dart'; import 'package:flutter/material.dart'; @@ -63,7 +63,7 @@ class _MedicineIntakeScreenState extends State { SizedBox(height: 86.v), _buildTextFormField(context), Spacer(), - CustomOutlinedButton( + NextStepButton( text: "continue".tr.toUpperCase(), buttonStyle: CustomButtonStyles.outlinePrimaryTL15, onPressed: () { diff --git a/lib/presentation/name_screen/models/name_model.dart b/lib/presentation/name_screen/models/name_model.dart index 22b2283..ac2d23d 100644 --- a/lib/presentation/name_screen/models/name_model.dart +++ b/lib/presentation/name_screen/models/name_model.dart @@ -1,14 +1,19 @@ // 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 { - NameModel() {} + NameModel({required this.userRegistrationSheet}); + UserRegistrationSheet userRegistrationSheet; - NameModel copyWith() { - return NameModel(); + NameModel copyWith({UserRegistrationSheet? userRegistrationSheet}) { + return NameModel( + userRegistrationSheet: + userRegistrationSheet ?? this.userRegistrationSheet, + ); } @override diff --git a/lib/presentation/name_screen/name_screen.dart b/lib/presentation/name_screen/name_screen.dart index 7c97fa8..b87cc7a 100644 --- a/lib/presentation/name_screen/name_screen.dart +++ b/lib/presentation/name_screen/name_screen.dart @@ -4,8 +4,9 @@ import 'package:eatvio_app/core/app_export.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart'; import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart'; -import 'package:eatvio_app/widgets/custom_outlined_button.dart'; +import 'package:eatvio_app/widgets/next_step_button.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 NameScreen extends StatefulWidget { @@ -13,7 +14,35 @@ class NameScreen extends StatefulWidget { static Widget builder(BuildContext context) { return BlocProvider( - create: (context) => NameBloc(NameState(nameModelObj: NameModel())) + create: (context) => NameBloc(NameState( + nameModelObj: NameModel( + userRegistrationSheet: UserRegistrationSheet( + firstName: '1', + lastName: '1', + email: '1', + password: '1', + passwordConfirmation: '1', + termsAccepted: true, + birthdate: DateTime.now(), + gender: '1', + country: '1', + city: '1', + lang: '1', + weight: 1, + height: 1, + chestCircumference: 1, + waistCircumference: 1, + hipCircumference: 1, + bloodPressureUp: 1, + bloodPressureDown: 1, + hasHypo: false, + hasHyper: false, + aboutAllergy: '1', + aboutTakingPils: '1', + aboutSportHobbies: '1', + favoriteFoods: '1', + unfavoriteFoods: '1', + additionalInfo: '1')))) ..add(NameInitialEvent()), child: NameScreen()); } @@ -75,7 +104,7 @@ class _NameScreenState extends State { }), SizedBox(height: 21.v), Spacer(), - CustomOutlinedButton( + NextStepButton( text: "continue".tr.toUpperCase(), buttonStyle: CustomButtonStyles.outlinePrimaryTL15, onPressed: () { diff --git a/lib/presentation/weight_screen/weight_screen.dart b/lib/presentation/weight_screen/weight_screen.dart index 61cfed5..aad4c57 100644 --- a/lib/presentation/weight_screen/weight_screen.dart +++ b/lib/presentation/weight_screen/weight_screen.dart @@ -5,7 +5,7 @@ import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart'; import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart'; import 'package:eatvio_app/widgets/custom_drop_down.dart'; -import 'package:eatvio_app/widgets/custom_outlined_button.dart'; +import 'package:eatvio_app/widgets/next_step_button.dart'; import 'package:flutter/material.dart'; class WeightScreen extends StatefulWidget { @@ -83,7 +83,7 @@ class _WeightScreenState extends State { ]) ]), Spacer(), - CustomOutlinedButton( + NextStepButton( text: "continue".tr.toUpperCase(), buttonStyle: CustomButtonStyles.outlinePrimaryTL15, onPressed: () { diff --git a/lib/widgets/custom_outlined_button.dart b/lib/widgets/next_step_button.dart similarity index 94% rename from lib/widgets/custom_outlined_button.dart rename to lib/widgets/next_step_button.dart index d498755..eb3f7e3 100644 --- a/lib/widgets/custom_outlined_button.dart +++ b/lib/widgets/next_step_button.dart @@ -1,9 +1,10 @@ import 'package:eatvio_app/core/app_export.dart'; import 'package:eatvio_app/widgets/base_button.dart'; import 'package:flutter/material.dart'; +import 'package:equatable/equatable.dart'; -class CustomOutlinedButton extends BaseButton { - CustomOutlinedButton({ +class NextStepButton extends BaseButton { + NextStepButton({ Key? key, this.decoration, this.leftIcon,