forked from eatvio/eatvio_app
Some further logic fixes
This commit is contained in:
1
devtools_options.yaml
Normal file
1
devtools_options.yaml
Normal file
@@ -0,0 +1 @@
|
||||
extensions:
|
||||
@@ -4,7 +4,7 @@ import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/widgets/next_step_button.dart';
|
||||
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -58,7 +58,7 @@ class _AdditionalInformationScreenState
|
||||
SizedBox(height: 73.v),
|
||||
_buildTextFormField(context),
|
||||
Spacer(),
|
||||
CustomOutlinedButton(
|
||||
NextStepButton(
|
||||
text: "finish".tr.toUpperCase(),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/widgets/next_step_button.dart';
|
||||
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -57,7 +57,7 @@ class _AllergiesScreenState extends State<AllergiesScreen> {
|
||||
Spacer(flex: 36),
|
||||
_buildTextFormField(context),
|
||||
Spacer(flex: 63),
|
||||
CustomOutlinedButton(
|
||||
NextStepButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_drop_down.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/widgets/next_step_button.dart';
|
||||
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -160,7 +160,7 @@ class _BloodPressureScreenState extends State<BloodPressureScreen> {
|
||||
});
|
||||
})),
|
||||
Spacer(),
|
||||
CustomOutlinedButton(
|
||||
NextStepButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
margin: EdgeInsets.symmetric(horizontal: 4.h),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/widgets/next_step_button.dart';
|
||||
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -93,7 +93,7 @@ class _BodyCircumferencesScreenState extends State<BodyCircumferencesScreen> {
|
||||
textInputAction: TextInputAction.done);
|
||||
}),
|
||||
Spacer(),
|
||||
CustomOutlinedButton(
|
||||
NextStepButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_drop_down.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/widgets/next_step_button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CityOfLivingScreen extends StatelessWidget {
|
||||
@@ -99,7 +99,7 @@ class CityOfLivingScreen extends StatelessWidget {
|
||||
});
|
||||
}),
|
||||
Spacer(flex: 65),
|
||||
CustomOutlinedButton(
|
||||
NextStepButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
|
||||
@@ -16,7 +16,7 @@ class CredentialsBloc extends Bloc<CredentialsEvent, CredentialsState> {
|
||||
Emitter<CredentialsState> emit,
|
||||
) async {
|
||||
emit(state.copyWith(
|
||||
emailController: TextEditingController(),
|
||||
valueController: TextEditingController(),
|
||||
passwordController: TextEditingController(),
|
||||
passwordConfirmationController: TextEditingController()));
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@ part of 'credentials_bloc.dart';
|
||||
/// Represents the state of Credentials in the application.
|
||||
class CredentialsState extends Equatable {
|
||||
CredentialsState({
|
||||
this.emailController,
|
||||
this.valueController,
|
||||
this.passwordController,
|
||||
this.passwordConfirmationController,
|
||||
this.credentialsModelObj,
|
||||
});
|
||||
|
||||
TextEditingController? emailController;
|
||||
TextEditingController? valueController;
|
||||
|
||||
TextEditingController? passwordController;
|
||||
|
||||
@@ -21,19 +21,19 @@ class CredentialsState extends Equatable {
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
emailController,
|
||||
valueController,
|
||||
passwordController,
|
||||
passwordConfirmationController,
|
||||
credentialsModelObj,
|
||||
];
|
||||
CredentialsState copyWith({
|
||||
TextEditingController? emailController,
|
||||
TextEditingController? valueController,
|
||||
TextEditingController? passwordController,
|
||||
TextEditingController? passwordConfirmationController,
|
||||
CredentialsModel? credentialsModelObj,
|
||||
}) {
|
||||
return CredentialsState(
|
||||
emailController: emailController ?? this.emailController,
|
||||
valueController: valueController ?? this.valueController,
|
||||
passwordController: passwordController ?? this.passwordController,
|
||||
passwordConfirmationController:
|
||||
passwordConfirmationController ?? this.passwordConfirmationController,
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
|
||||
|
||||
import 'bloc/credentials_bloc.dart';
|
||||
import 'models/credentials_model.dart';
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/widgets/next_step_button.dart';
|
||||
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -55,10 +57,10 @@ class CredentialsScreen extends StatelessWidget {
|
||||
SizedBox(height: 3.v),
|
||||
BlocSelector<CredentialsBloc, CredentialsState,
|
||||
TextEditingController?>(
|
||||
selector: (state) => state.passwordController,
|
||||
builder: (context, passwordController) {
|
||||
selector: (state) => state.valueController,
|
||||
builder: (context, valueController) {
|
||||
return CustomTextFormField(
|
||||
controller: passwordController,
|
||||
controller: valueController,
|
||||
textInputAction: TextInputAction.done);
|
||||
}),
|
||||
SizedBox(height: 19.v),
|
||||
@@ -66,11 +68,11 @@ class CredentialsScreen extends StatelessWidget {
|
||||
SizedBox(height: 5.v),
|
||||
BlocSelector<CredentialsBloc, CredentialsState,
|
||||
TextEditingController?>(
|
||||
selector: (state) => state.passwordConfirmationController,
|
||||
builder: (context, passwordConfirmationController) {
|
||||
selector: (state) => state.passwordController,
|
||||
builder: (context, passwordController) {
|
||||
return CustomTextFormField(
|
||||
obscureText: true,
|
||||
controller: passwordConfirmationController,
|
||||
controller: passwordController,
|
||||
);
|
||||
}),
|
||||
SizedBox(height: 21.v),
|
||||
@@ -79,15 +81,15 @@ class CredentialsScreen extends StatelessWidget {
|
||||
SizedBox(height: 3.v),
|
||||
BlocSelector<CredentialsBloc, CredentialsState,
|
||||
TextEditingController?>(
|
||||
selector: (state) => state.emailController,
|
||||
builder: (context, emailController3) {
|
||||
selector: (state) => state.passwordConfirmationController,
|
||||
builder: (context, passwordConfirmationController) {
|
||||
return CustomTextFormField(
|
||||
obscureText: true,
|
||||
controller: emailController3,
|
||||
controller: passwordConfirmationController,
|
||||
textInputAction: TextInputAction.done);
|
||||
}),
|
||||
Spacer(),
|
||||
CustomOutlinedButton(
|
||||
NextStepButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/widgets/next_step_button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DateOfBirthScreen extends StatefulWidget {
|
||||
@@ -58,7 +58,7 @@ class _DateOfBirthScreenState extends State<DateOfBirthScreen> {
|
||||
Spacer(flex: 39),
|
||||
_buildDateInput(context),
|
||||
Spacer(flex: 60),
|
||||
CustomOutlinedButton(
|
||||
NextStepButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/widgets/next_step_button.dart';
|
||||
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -65,7 +65,7 @@ class _FavoriteFoodsScreenState extends State<FavoriteFoodsScreen> {
|
||||
SizedBox(height: 22.v),
|
||||
_buildTextFormField1(context),
|
||||
SizedBox(height: 27.v),
|
||||
CustomOutlinedButton(
|
||||
NextStepButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/widgets/next_step_button.dart';
|
||||
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -60,7 +60,7 @@ class _FavoriteSportsScreenState extends State<FavoriteSportsScreen> {
|
||||
Spacer(flex: 32),
|
||||
_buildTextFormFieldSection(context),
|
||||
Spacer(flex: 67),
|
||||
CustomOutlinedButton(
|
||||
NextStepButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/widgets/next_step_button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
enum Gender { male, female }
|
||||
@@ -92,7 +92,7 @@ class _GenderScreenState extends State<GenderScreen> {
|
||||
),
|
||||
),
|
||||
Spacer(flex: 66),
|
||||
CustomOutlinedButton(
|
||||
NextStepButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_drop_down.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/widgets/next_step_button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class HeightScreen extends StatefulWidget {
|
||||
@@ -83,7 +83,7 @@ class _HeightScreenState extends State<HeightScreen> {
|
||||
])
|
||||
]),
|
||||
Spacer(),
|
||||
CustomOutlinedButton(
|
||||
NextStepButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
|
||||
@@ -2,17 +2,13 @@ import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/language_select_screen/models/language_select_model.dart';
|
||||
import 'dart:convert';
|
||||
part 'language_select_event.dart';
|
||||
part 'language_select_state.dart';
|
||||
|
||||
/// A bloc that manages the state of a LanguageSelect according to the event that is dispatched to it.
|
||||
class LanguageSelectBloc
|
||||
extends Bloc<LanguageSelectEvent, LanguageSelectState> {
|
||||
LanguageSelectModel languageSelectModel;
|
||||
LanguageSelectBloc(LanguageSelectState initialState,
|
||||
{required this.languageSelectModel})
|
||||
: super(initialState) {
|
||||
LanguageSelectBloc(LanguageSelectState initialState) : super(initialState) {
|
||||
on<LanguageSelectInitialEvent>(_onInitialize);
|
||||
on<ChangeDropDownEvent>(_changeDropDown);
|
||||
}
|
||||
@@ -31,8 +27,9 @@ class LanguageSelectBloc
|
||||
Emitter<LanguageSelectState> emit,
|
||||
) {
|
||||
emit(state.copyWith(selectedDropDownValue: event.value));
|
||||
languageSelectModel.userRegistrationSheet.lang = event.value.title;
|
||||
print(json.encode(languageSelectModel.userRegistrationSheet.lang));
|
||||
state.languageSelectModelObj?.userRegistrationSheet.lang =
|
||||
event.value.title;
|
||||
print(state.languageSelectModelObj?.userRegistrationSheet.lang);
|
||||
}
|
||||
|
||||
List<SelectionPopupModel> fillDropdownItemList() {
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'bloc/language_select_bloc.dart';
|
||||
import 'models/language_select_model.dart';
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/widgets/custom_drop_down.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/widgets/next_step_button.dart';
|
||||
import 'package:eatvio_app/presentation/credentials_screen/models/credentials_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -11,8 +11,7 @@ class LanguageSelectScreen extends StatelessWidget {
|
||||
static Widget builder(BuildContext context) {
|
||||
return BlocProvider<LanguageSelectBloc>(
|
||||
create: (context) => LanguageSelectBloc(
|
||||
LanguageSelectState(languageSelectModelObj: LanguageSelectModel()),
|
||||
languageSelectModel: LanguageSelectModel())
|
||||
LanguageSelectState(languageSelectModelObj: LanguageSelectModel()))
|
||||
..add(LanguageSelectInitialEvent()),
|
||||
child: LanguageSelectScreen());
|
||||
}
|
||||
@@ -59,7 +58,10 @@ class LanguageSelectScreen extends StatelessWidget {
|
||||
BlocSelector<LanguageSelectBloc, LanguageSelectState,
|
||||
LanguageSelectModel?>(
|
||||
selector: (state) => state.languageSelectModelObj,
|
||||
builder: (context, languageSelectModelObj) {
|
||||
builder: (
|
||||
context,
|
||||
languageSelectModelObj,
|
||||
) {
|
||||
return CustomDropDown(
|
||||
icon: Container(
|
||||
margin:
|
||||
@@ -81,23 +83,31 @@ class LanguageSelectScreen extends StatelessWidget {
|
||||
}),
|
||||
Spacer(flex: 63)
|
||||
])),
|
||||
bottomNavigationBar: CustomOutlinedButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
margin: EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
navigteToCredentials(context);
|
||||
})));
|
||||
bottomNavigationBar:
|
||||
BlocBuilder<LanguageSelectBloc, LanguageSelectState>(
|
||||
builder: (context, state) {
|
||||
return NextStepButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
margin:
|
||||
EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
navigteToCredentials(context, state);
|
||||
});
|
||||
})));
|
||||
}
|
||||
|
||||
/// Navigates to the genderScreen when the action is triggered.
|
||||
navigteToCredentials(BuildContext context) {
|
||||
LanguageSelectModel languageSelectModel = LanguageSelectModel();
|
||||
CredentialsModel credentialsModel = CredentialsModel(
|
||||
userRegistrationSheet: languageSelectModel.userRegistrationSheet);
|
||||
NavigatorService.pushNamed(
|
||||
AppRoutes.credentialsScreen,
|
||||
arguments: credentialsModel,
|
||||
);
|
||||
navigteToCredentials(BuildContext context, LanguageSelectState state) {
|
||||
if (state.languageSelectModelObj != null) {
|
||||
CredentialsModel credentialsModel = CredentialsModel(
|
||||
userRegistrationSheet:
|
||||
state.languageSelectModelObj.userRegistrationSheet,
|
||||
);
|
||||
NavigatorService.pushNamed(
|
||||
AppRoutes.credentialsScreen,
|
||||
arguments: credentialsModel,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/widgets/next_step_button.dart';
|
||||
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -63,7 +63,7 @@ class _MedicineIntakeScreenState extends State<MedicineIntakeScreen> {
|
||||
SizedBox(height: 86.v),
|
||||
_buildTextFormField(context),
|
||||
Spacer(),
|
||||
CustomOutlinedButton(
|
||||
NextStepButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
// 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 [name_screen],
|
||||
/// and is typically used to hold data that is passed between different parts of the application.
|
||||
class NameModel extends Equatable {
|
||||
NameModel() {}
|
||||
NameModel({required this.userRegistrationSheet});
|
||||
UserRegistrationSheet userRegistrationSheet;
|
||||
|
||||
NameModel copyWith() {
|
||||
return NameModel();
|
||||
NameModel copyWith({UserRegistrationSheet? userRegistrationSheet}) {
|
||||
return NameModel(
|
||||
userRegistrationSheet:
|
||||
userRegistrationSheet ?? this.userRegistrationSheet,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -4,8 +4,9 @@ import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/widgets/next_step_button.dart';
|
||||
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
||||
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class NameScreen extends StatefulWidget {
|
||||
@@ -13,7 +14,35 @@ class NameScreen extends StatefulWidget {
|
||||
|
||||
static Widget builder(BuildContext context) {
|
||||
return BlocProvider<NameBloc>(
|
||||
create: (context) => NameBloc(NameState(nameModelObj: NameModel()))
|
||||
create: (context) => NameBloc(NameState(
|
||||
nameModelObj: NameModel(
|
||||
userRegistrationSheet: UserRegistrationSheet(
|
||||
firstName: '1',
|
||||
lastName: '1',
|
||||
email: '1',
|
||||
password: '1',
|
||||
passwordConfirmation: '1',
|
||||
termsAccepted: true,
|
||||
birthdate: DateTime.now(),
|
||||
gender: '1',
|
||||
country: '1',
|
||||
city: '1',
|
||||
lang: '1',
|
||||
weight: 1,
|
||||
height: 1,
|
||||
chestCircumference: 1,
|
||||
waistCircumference: 1,
|
||||
hipCircumference: 1,
|
||||
bloodPressureUp: 1,
|
||||
bloodPressureDown: 1,
|
||||
hasHypo: false,
|
||||
hasHyper: false,
|
||||
aboutAllergy: '1',
|
||||
aboutTakingPils: '1',
|
||||
aboutSportHobbies: '1',
|
||||
favoriteFoods: '1',
|
||||
unfavoriteFoods: '1',
|
||||
additionalInfo: '1'))))
|
||||
..add(NameInitialEvent()),
|
||||
child: NameScreen());
|
||||
}
|
||||
@@ -75,7 +104,7 @@ class _NameScreenState extends State<NameScreen> {
|
||||
}),
|
||||
SizedBox(height: 21.v),
|
||||
Spacer(),
|
||||
CustomOutlinedButton(
|
||||
NextStepButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart';
|
||||
import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_drop_down.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/widgets/next_step_button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class WeightScreen extends StatefulWidget {
|
||||
@@ -83,7 +83,7 @@ class _WeightScreenState extends State<WeightScreen> {
|
||||
])
|
||||
]),
|
||||
Spacer(),
|
||||
CustomOutlinedButton(
|
||||
NextStepButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/widgets/base_button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class CustomOutlinedButton extends BaseButton {
|
||||
CustomOutlinedButton({
|
||||
class NextStepButton extends BaseButton {
|
||||
NextStepButton({
|
||||
Key? key,
|
||||
this.decoration,
|
||||
this.leftIcon,
|
||||
Reference in New Issue
Block a user