forked from eatvio/eatvio_app
Initialized UserRegistrationSheet class
This commit is contained in:
@@ -82,22 +82,6 @@ class _AdditionalInformationScreenState
|
||||
title: AppbarTitleImage(imagePath: ImageConstant.imgLogoEatvio));
|
||||
}
|
||||
|
||||
/// Section Widget
|
||||
Widget _buildProgressIndicator(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 4.h, vertical: 3.v),
|
||||
decoration: AppDecoration.outlinePrimary
|
||||
.copyWith(borderRadius: BorderRadiusStyle.circleBorder8),
|
||||
child: Container(
|
||||
height: 8.v,
|
||||
width: 332.h,
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.blueA400,
|
||||
borderRadius: BorderRadius.circular(4.h),
|
||||
border:
|
||||
Border.all(color: theme.colorScheme.primary, width: 1.h))));
|
||||
}
|
||||
|
||||
/// Section Widget
|
||||
Widget _buildTextFormField(BuildContext context) {
|
||||
return SizedBox(
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// 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 [credentials_screen],
|
||||
/// and is typically used to hold data that is passed between different parts of the application.
|
||||
|
||||
@@ -27,6 +27,7 @@ class LanguageSelectBloc
|
||||
Emitter<LanguageSelectState> emit,
|
||||
) {
|
||||
emit(state.copyWith(selectedDropDownValue: event.value));
|
||||
LanguageSelectModel().userRegistrationSheet.lang = event.value.toString();
|
||||
}
|
||||
|
||||
List<SelectionPopupModel> fillDropdownItemList() {
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'package:eatvio_app/widgets/custom_drop_down.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class LanguageSelectScreen extends StatefulWidget {
|
||||
class LanguageSelectScreen extends StatelessWidget {
|
||||
const LanguageSelectScreen({Key? key}) : super(key: key);
|
||||
|
||||
static Widget builder(BuildContext context) {
|
||||
@@ -16,11 +16,6 @@ class LanguageSelectScreen extends StatefulWidget {
|
||||
child: LanguageSelectScreen());
|
||||
}
|
||||
|
||||
@override
|
||||
State<LanguageSelectScreen> createState() => _LanguageSelectScreenState();
|
||||
}
|
||||
|
||||
class _LanguageSelectScreenState extends State<LanguageSelectScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
mediaQueryData = MediaQuery.of(context);
|
||||
@@ -85,41 +80,21 @@ class _LanguageSelectScreenState extends State<LanguageSelectScreen> {
|
||||
}),
|
||||
Spacer(flex: 63)
|
||||
])),
|
||||
bottomNavigationBar: _buildContinueButtonSection(context)));
|
||||
}
|
||||
|
||||
/// Section Widget
|
||||
Widget _buildProgressIndicatorSection(BuildContext context) {
|
||||
return Container(
|
||||
width: 343.h,
|
||||
padding: EdgeInsets.symmetric(horizontal: 4.h, vertical: 3.v),
|
||||
decoration: AppDecoration.outlinePrimary
|
||||
.copyWith(borderRadius: BorderRadiusStyle.circleBorder8),
|
||||
child: Container(
|
||||
height: 8.v,
|
||||
width: 20.h,
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.blueA400,
|
||||
borderRadius: BorderRadius.circular(4.h),
|
||||
border:
|
||||
Border.all(color: theme.colorScheme.primary, width: 1.h))));
|
||||
}
|
||||
|
||||
/// Section Widget
|
||||
Widget _buildContinueButtonSection(BuildContext context) {
|
||||
return CustomOutlinedButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
margin: EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
navigteToCredentials(context);
|
||||
});
|
||||
bottomNavigationBar: CustomOutlinedButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
margin: EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
navigteToCredentials(context);
|
||||
})));
|
||||
}
|
||||
|
||||
/// Navigates to the genderScreen when the action is triggered.
|
||||
navigteToCredentials(BuildContext context) {
|
||||
LanguageSelectModel languageSelectModel = LanguageSelectModel();
|
||||
NavigatorService.pushNamed(
|
||||
AppRoutes.credentialsScreen,
|
||||
arguments: languageSelectModel.userRegistrationSheet,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,41 @@
|
||||
// ignore_for_file: must_be_immutable
|
||||
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
|
||||
import 'package:eatvio_app/data/models/selectionPopupModel/selection_popup_model.dart';
|
||||
|
||||
/// This class defines the variables used in the [language_select_screen],
|
||||
/// and is typically used to hold data that is passed between different parts of the application.
|
||||
class LanguageSelectModel extends Equatable {
|
||||
LanguageSelectModel({this.dropdownItemList = const []}) {}
|
||||
|
||||
UserRegistrationSheet userRegistrationSheet = UserRegistrationSheet(
|
||||
firstName: '',
|
||||
lastName: '',
|
||||
email: '',
|
||||
password: '',
|
||||
passwordConfirmation: '',
|
||||
termsAccepted: false,
|
||||
birthdate: DateTime.now(),
|
||||
gender: '',
|
||||
country: '',
|
||||
city: '',
|
||||
lang: '',
|
||||
weight: 0,
|
||||
height: 0,
|
||||
chestCircumference: 0,
|
||||
waistCircumference: 0,
|
||||
hipCircumference: 0,
|
||||
bloodPressureUp: 0,
|
||||
bloodPressureDown: 0,
|
||||
hasHypo: false,
|
||||
hasHyper: false,
|
||||
aboutAllergy: '',
|
||||
aboutTakingPils: '',
|
||||
aboutSportHobbies: '',
|
||||
favoriteFoods: '',
|
||||
unfavoriteFoods: '',
|
||||
additionalInfo: '',
|
||||
);
|
||||
List<SelectionPopupModel> dropdownItemList;
|
||||
|
||||
LanguageSelectModel copyWith({List<SelectionPopupModel>? dropdownItemList}) {
|
||||
|
||||
Reference in New Issue
Block a user