Added height screen for registration & set adequate options and initial parameters for height/weight

This commit is contained in:
2023-12-19 15:09:52 +03:00
parent 767e45e323
commit 75efb1e414
11 changed files with 264 additions and 12 deletions

View File

@@ -29,10 +29,12 @@ class WeightBloc extends Bloc<WeightEvent, WeightState> {
}
List<SelectionPopupModel> fillDropdownItemList() {
return [
SelectionPopupModel(id: 1, title: "Item One", isSelected: true),
SelectionPopupModel(id: 2, title: "Item Two"),
SelectionPopupModel(id: 3, title: "Item Three")
];
List<SelectionPopupModel> selectionPopupModels = [];
for (int i = 35; i <= 200; i++) {
selectionPopupModels
.add(SelectionPopupModel(id: i - 34, title: i.toString()));
}
return selectionPopupModels;
}
}

View File

@@ -52,7 +52,7 @@ class WeightScreen extends StatelessWidget {
text: "continue".tr.toUpperCase(),
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
onPressed: () {
navigateToAllergies(context);
navigateToHeight(context);
}),
SizedBox(height: 17.v),
Text("skip".tr, style: theme.textTheme.bodyLarge)
@@ -90,7 +90,7 @@ class WeightScreen extends StatelessWidget {
imagePath: ImageConstant.imgFavorite,
height: 12.adaptSize,
width: 12.adaptSize)),
hintText: "lbl_70".tr,
hintText: "70",
items: weightModelObj?.dropdownItemList ?? [],
onChanged: (value) {
context
@@ -116,9 +116,9 @@ class WeightScreen extends StatelessWidget {
}
/// Navigates to the allergiesScreen when the action is triggered.
navigateToAllergies(BuildContext context) {
navigateToHeight(BuildContext context) {
NavigatorService.pushNamed(
AppRoutes.allergiesScreen,
AppRoutes.heightScreen,
);
}
}