remoced Skip btton from reuired fields screens and removed excess section widgets

This commit is contained in:
2023-12-21 12:37:31 +03:00
parent ac0f649069
commit 88a5e2d151
8 changed files with 74 additions and 137 deletions

View File

@@ -51,7 +51,37 @@ class _HeightScreenState extends State<HeightScreen> {
valueColor: AlwaysStoppedAnimation<Color>(
appTheme.blueA400)))),
SizedBox(height: 39.v),
_buildTwentySix(context),
Column(children: [
Text("height_measurements".tr,
style: theme.textTheme.headlineSmall),
SizedBox(height: 174.v),
Column(children: [
Text("your_height".tr, style: theme.textTheme.bodyLarge),
SizedBox(height: 4.v),
BlocSelector<HeightBloc, HeightState, HeightModel?>(
selector: (state) => state.heightModelObj,
builder: (context, heightModelObj) {
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: "170",
items: heightModelObj?.dropdownItemList ?? [],
onChanged: (value) {
context
.read<HeightBloc>()
.add(ChangeDropDownEvent(value: value));
});
})
])
]),
Spacer(),
CustomOutlinedButton(
text: "continue".tr.toUpperCase(),
@@ -60,7 +90,6 @@ class _HeightScreenState extends State<HeightScreen> {
navigateToAllergies(context);
}),
SizedBox(height: 17.v),
Text("skip".tr, style: theme.textTheme.bodyLarge)
]))));
}
@@ -78,43 +107,6 @@ class _HeightScreenState extends State<HeightScreen> {
title: AppbarTitleImage(imagePath: ImageConstant.imgLogoEatvio));
}
/// Section Widget
Widget _buildWeight(BuildContext context) {
return Column(children: [
Text("your_height".tr, style: theme.textTheme.bodyLarge),
SizedBox(height: 4.v),
BlocSelector<HeightBloc, HeightState, HeightModel?>(
selector: (state) => state.heightModelObj,
builder: (context, heightModelObj) {
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: "170",
items: heightModelObj?.dropdownItemList ?? [],
onChanged: (value) {
context
.read<HeightBloc>()
.add(ChangeDropDownEvent(value: value));
});
})
]);
}
/// Section Widget
Widget _buildTwentySix(BuildContext context) {
return Column(children: [
Text("height_measurements".tr, style: theme.textTheme.headlineSmall),
SizedBox(height: 174.v),
_buildWeight(context)
]);
}
/// Navigates to the previous screen.
onTapArrowLeft(BuildContext context) {
NavigatorService.goBack();