forked from eatvio/eatvio_app
Added height screen for registration & set adequate options and initial parameters for height/weight
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user