From 14cd56742892b9f05edd5c1ff7d46ee6f636b33b Mon Sep 17 00:00:00 2001 From: maxxkim Date: Tue, 26 Dec 2023 16:49:01 +0300 Subject: [PATCH] Layout fix --- .../additional_information_screen.dart | 1 - .../allergies_screen/allergies_screen.dart | 21 +++++++++++++++---- .../blood_pressure_screen.dart | 17 +++++++++++++-- .../body_circumferences_screen.dart | 1 - .../city_of_living_screen.dart | 1 - .../credentials_screen.dart | 12 ----------- .../date_of_birth_screen.dart | 1 - .../favorite_foods_screen.dart | 19 ++++++++++++++--- .../favorite_sports_screen.dart | 19 ++++++++++++++--- .../gender_screen/gender_screen.dart | 1 - .../height_screen/height_screen.dart | 1 - .../medicine_intake_screen.dart | 19 ++++++++++++++--- lib/presentation/name_screen/name_screen.dart | 1 - .../weight_screen/weight_screen.dart | 1 - 14 files changed, 80 insertions(+), 35 deletions(-) diff --git a/lib/presentation/additional_information_screen/additional_information_screen.dart b/lib/presentation/additional_information_screen/additional_information_screen.dart index 76b53580..f534bf14 100644 --- a/lib/presentation/additional_information_screen/additional_information_screen.dart +++ b/lib/presentation/additional_information_screen/additional_information_screen.dart @@ -77,7 +77,6 @@ class AdditionalInformationScreen extends StatelessWidget { print(response.body); }); }), - SizedBox(height: 17.v), ])))); } diff --git a/lib/presentation/allergies_screen/allergies_screen.dart b/lib/presentation/allergies_screen/allergies_screen.dart index 0e4de30d..c617aa5d 100644 --- a/lib/presentation/allergies_screen/allergies_screen.dart +++ b/lib/presentation/allergies_screen/allergies_screen.dart @@ -56,10 +56,10 @@ class _AllergiesScreenState extends State { appTheme.blueA400)))), SizedBox(height: 22.v), Text("allergies_presence".tr, - style: CustomTextStyles.headlineSmallMulish), + style: theme.textTheme.headlineSmall), Spacer(flex: 36), _buildTextFormField(context), - Spacer(flex: 63), + Spacer(flex: 54), BlocBuilder( builder: (context, state) { return NextStepButton( @@ -79,8 +79,21 @@ class _AllergiesScreenState extends State { ); }); }), - SizedBox(height: 17.v), - Text("skip".tr, style: theme.textTheme.bodyLarge) + BlocBuilder( + builder: (context, state) { + return GestureDetector( + onTap: () { + UserRegistrationSheet sheet = + state.allergiesModelObj!.userRegistrationSheet; + Navigator.pushNamed( + context, + AppRoutes.medicineIntakeScreen, + arguments: sheet, + ); + }, + child: Text("skip".tr, style: theme.textTheme.bodyLarge), + ); + }), ])))); } diff --git a/lib/presentation/blood_pressure_screen/blood_pressure_screen.dart b/lib/presentation/blood_pressure_screen/blood_pressure_screen.dart index 0ecd9b61..0efd74cf 100644 --- a/lib/presentation/blood_pressure_screen/blood_pressure_screen.dart +++ b/lib/presentation/blood_pressure_screen/blood_pressure_screen.dart @@ -188,8 +188,21 @@ class _BloodPressureScreenState extends State { ); }); }), - SizedBox(height: 17.v), - Text("skip".tr, style: theme.textTheme.bodyLarge) + BlocBuilder( + builder: (context, state) { + return GestureDetector( + onTap: () { + UserRegistrationSheet sheet = + state.bloodPressureModelObj!.userRegistrationSheet; + Navigator.pushNamed( + context, + AppRoutes.favoriteSportsScreen, + arguments: sheet, + ); + }, + child: Text("skip".tr, style: theme.textTheme.bodyLarge), + ); + }), ])))); } diff --git a/lib/presentation/body_circumferences_screen/body_circumferences_screen.dart b/lib/presentation/body_circumferences_screen/body_circumferences_screen.dart index 7aa3490b..d85d84ad 100644 --- a/lib/presentation/body_circumferences_screen/body_circumferences_screen.dart +++ b/lib/presentation/body_circumferences_screen/body_circumferences_screen.dart @@ -122,7 +122,6 @@ class BodyCircumferencesScreen extends StatelessWidget { ); }); }), - SizedBox(height: 17.v), ])))); } 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 2f2e8655..1e14a9c1 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 @@ -121,7 +121,6 @@ class CityOfLivingScreen extends StatelessWidget { ); }); }), - SizedBox(height: 17.v), ])))); } diff --git a/lib/presentation/credentials_screen/credentials_screen.dart b/lib/presentation/credentials_screen/credentials_screen.dart index 978aea11..cd3da8dd 100644 --- a/lib/presentation/credentials_screen/credentials_screen.dart +++ b/lib/presentation/credentials_screen/credentials_screen.dart @@ -111,7 +111,6 @@ class CredentialsScreen extends StatelessWidget { ); }); }), - SizedBox(height: 17.v), ])))); } @@ -119,18 +118,7 @@ class CredentialsScreen extends StatelessWidget { PreferredSizeWidget _buildAppBar(BuildContext context) { return CustomAppBar( leadingWidth: 29.h, - leading: AppbarLeadingImage( - imagePath: ImageConstant.imgArrowLeft, - margin: EdgeInsets.only(left: 16.h, top: 15.v, bottom: 15.v), - onTap: () { - onTapArrowLeft(context); - }), centerTitle: true, title: AppbarTitleImage(imagePath: ImageConstant.imgLogoEatvio)); } - - /// Navigates to the previous screen. - onTapArrowLeft(BuildContext context) { - NavigatorService.goBack(); - } } 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 8b7c6d89..49ef2848 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 @@ -80,7 +80,6 @@ class _DateOfBirthScreenState extends State { ); }); }), - SizedBox(height: 17.v), ])))); }); } diff --git a/lib/presentation/favorite_foods_screen/favorite_foods_screen.dart b/lib/presentation/favorite_foods_screen/favorite_foods_screen.dart index 625d221d..7db73fbd 100644 --- a/lib/presentation/favorite_foods_screen/favorite_foods_screen.dart +++ b/lib/presentation/favorite_foods_screen/favorite_foods_screen.dart @@ -74,7 +74,7 @@ class _FavoriteFoodsScreenState extends State { return NextStepButton( text: "continue".tr.toUpperCase(), margin: EdgeInsets.only( - left: 16.h, right: 16.h, bottom: 50.v), + left: 16.h, right: 16.h, bottom: 40.v), buttonStyle: CustomButtonStyles.outlinePrimaryTL15, onPressed: () { UserRegistrationSheet sheet = state @@ -90,8 +90,21 @@ class _FavoriteFoodsScreenState extends State { ); }); }), - SizedBox(height: 17.v), - Text("skip".tr, style: theme.textTheme.bodyLarge) + BlocBuilder( + builder: (context, state) { + return GestureDetector( + onTap: () { + UserRegistrationSheet sheet = + state.favoriteFoodsModelObj!.userRegistrationSheet; + Navigator.pushNamed( + context, + AppRoutes.additionalInformationScreen, + arguments: sheet, + ); + }, + child: Text("skip".tr, style: theme.textTheme.bodyLarge), + ); + }), ])))); } diff --git a/lib/presentation/favorite_sports_screen/favorite_sports_screen.dart b/lib/presentation/favorite_sports_screen/favorite_sports_screen.dart index 2d531bea..8374c74b 100644 --- a/lib/presentation/favorite_sports_screen/favorite_sports_screen.dart +++ b/lib/presentation/favorite_sports_screen/favorite_sports_screen.dart @@ -84,9 +84,22 @@ class _FavoriteSportsScreenState extends State { ); }); }), - SizedBox(height: 17.v), - Text("skip".tr, style: theme.textTheme.bodyLarge), - SizedBox(height: 4.v) + BlocBuilder( + builder: (context, state) { + return GestureDetector( + onTap: () { + UserRegistrationSheet sheet = state + .favoriteSportsModelObj!.userRegistrationSheet; + Navigator.pushNamed( + context, + AppRoutes.favoriteFoodsScreen, + arguments: sheet, + ); + }, + child: + Text("skip".tr, style: theme.textTheme.bodyLarge), + ); + }), ])))); } diff --git a/lib/presentation/gender_screen/gender_screen.dart b/lib/presentation/gender_screen/gender_screen.dart index be2c3f42..34dcc859 100644 --- a/lib/presentation/gender_screen/gender_screen.dart +++ b/lib/presentation/gender_screen/gender_screen.dart @@ -106,7 +106,6 @@ class _GenderScreenState extends State { ); }); }), - SizedBox(height: 17.v), ])))); }); } diff --git a/lib/presentation/height_screen/height_screen.dart b/lib/presentation/height_screen/height_screen.dart index 17a5a9ab..6563fcaa 100644 --- a/lib/presentation/height_screen/height_screen.dart +++ b/lib/presentation/height_screen/height_screen.dart @@ -103,7 +103,6 @@ class _HeightScreenState extends State { ); }); }), - SizedBox(height: 17.v), ])))); } diff --git a/lib/presentation/medicine_intake_screen/medicine_intake_screen.dart b/lib/presentation/medicine_intake_screen/medicine_intake_screen.dart index 5b8fdb95..fc0766f6 100644 --- a/lib/presentation/medicine_intake_screen/medicine_intake_screen.dart +++ b/lib/presentation/medicine_intake_screen/medicine_intake_screen.dart @@ -63,7 +63,7 @@ class _MedicineIntakeScreenState extends State { maxLines: 2, overflow: TextOverflow.ellipsis, textAlign: TextAlign.center, - style: CustomTextStyles.headlineSmallMulish)), + style: theme.textTheme.headlineSmall)), SizedBox(height: 86.v), _buildTextFormField(context), Spacer(), @@ -86,8 +86,21 @@ class _MedicineIntakeScreenState extends State { ); }); }), - SizedBox(height: 17.v), - Text("skip".tr, style: theme.textTheme.bodyLarge) + BlocBuilder( + builder: (context, state) { + return GestureDetector( + onTap: () { + UserRegistrationSheet sheet = + state.medicineIntakeModelObj!.userRegistrationSheet; + Navigator.pushNamed( + context, + AppRoutes.bloodPressureScreen, + arguments: sheet, + ); + }, + child: Text("skip".tr, style: theme.textTheme.bodyLarge), + ); + }), ])))); } diff --git a/lib/presentation/name_screen/name_screen.dart b/lib/presentation/name_screen/name_screen.dart index 2e7bc8ab..9d9d132e 100644 --- a/lib/presentation/name_screen/name_screen.dart +++ b/lib/presentation/name_screen/name_screen.dart @@ -94,7 +94,6 @@ class NameScreen extends StatelessWidget { ); }); }), - SizedBox(height: 17.v), ])))); } diff --git a/lib/presentation/weight_screen/weight_screen.dart b/lib/presentation/weight_screen/weight_screen.dart index 8e606e1c..ab936350 100644 --- a/lib/presentation/weight_screen/weight_screen.dart +++ b/lib/presentation/weight_screen/weight_screen.dart @@ -103,7 +103,6 @@ class _WeightScreenState extends State { ); }); }), - SizedBox(height: 17.v), ])))); }