forked from eatvio/eatvio_app
feature(registration): refactor
This commit is contained in:
@@ -52,7 +52,7 @@ class AdditionalInformationScreen extends StatelessWidget {
|
||||
onTapFinish(AdditionalInformationState state, BuildContext context) {
|
||||
return () async {
|
||||
UserRegistrationSheet sheet = state.additionalInformationModelObj!.userRegistrationSheet;
|
||||
sheet.additionalInfo = state.editTextController!.text;
|
||||
// sheet.additionalInfo = state.editTextController!.text;
|
||||
|
||||
final response = await http.post(
|
||||
Uri.parse(dotenv.env['SERVER_ROOT']! + '/register'),
|
||||
|
||||
@@ -68,7 +68,7 @@ class _AllergiesScreenState extends State<AllergiesScreen> {
|
||||
onTapContinue(AllergiesState state, BuildContext context) {
|
||||
return () {
|
||||
UserRegistrationSheet sheet = state.allergiesModelObj!.userRegistrationSheet;
|
||||
sheet.aboutAllergy = state.enterInformationController!.text;
|
||||
// sheet.aboutAllergy = state.enterInformationController!.text;
|
||||
GoRouter.of(context).goNamed('medicineIntakeScreen', extra: sheet);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ class BloodPressureBloc extends Bloc<BloodPressureEvent, BloodPressureState> {
|
||||
Emitter<BloodPressureState> emit,
|
||||
) {
|
||||
if (event.value.id == 1) {
|
||||
state.bloodPressureModelObj!.userRegistrationSheet.hasHyper = '1';
|
||||
// state.bloodPressureModelObj!.userRegistrationSheet.hasHyper = '1';
|
||||
} else {
|
||||
state.bloodPressureModelObj!.userRegistrationSheet.hasHyper = '0';
|
||||
// state.bloodPressureModelObj!.userRegistrationSheet.hasHyper = '0';
|
||||
}
|
||||
emit(state.copyWith(selectedHyperValue: event.value));
|
||||
}
|
||||
@@ -30,9 +30,9 @@ class BloodPressureBloc extends Bloc<BloodPressureEvent, BloodPressureState> {
|
||||
Emitter<BloodPressureState> emit,
|
||||
) {
|
||||
if (event.value.id == 1) {
|
||||
state.bloodPressureModelObj!.userRegistrationSheet.hasHypo = '1';
|
||||
// state.bloodPressureModelObj!.userRegistrationSheet.hasHypo = '1';
|
||||
} else {
|
||||
state.bloodPressureModelObj!.userRegistrationSheet.hasHypo = '0';
|
||||
// state.bloodPressureModelObj!.userRegistrationSheet.hasHypo = '0';
|
||||
}
|
||||
emit(state.copyWith(selectedHypoValue: event.value));
|
||||
}
|
||||
|
||||
@@ -159,8 +159,8 @@ class _BloodPressureScreenState extends State<BloodPressureScreen> {
|
||||
List<String> errors = validateFields(state.upPressureController!.text, state.downPressureController!.text);
|
||||
if (errors.isEmpty) {
|
||||
UserRegistrationSheet sheet = state.bloodPressureModelObj!.userRegistrationSheet;
|
||||
sheet.bloodPressureUp = state.upPressureController!.text;
|
||||
sheet.bloodPressureDown = state.downPressureController!.text;
|
||||
// sheet.bloodPressureUp = state.upPressureController!.text;
|
||||
// sheet.bloodPressureDown = state.downPressureController!.text;
|
||||
AppRouter.navigatorKey.currentContext?.goNamed('allergiesScreen', extra: sheet);
|
||||
} else {
|
||||
String errorMessage = '';
|
||||
|
||||
@@ -36,7 +36,7 @@ class _BodyCircumferencesScreenState extends State<BodyCircumferencesScreen> {
|
||||
child: Column(
|
||||
children: [
|
||||
Text("initial_measurements".tr, style: theme.textTheme.headlineSmall),
|
||||
SizedBox(height: 93.v),
|
||||
SizedBox(height: 16.v),
|
||||
Column(
|
||||
children: [
|
||||
Text("chest_circumference".tr, style: theme.textTheme.bodyLarge),
|
||||
@@ -94,9 +94,9 @@ class _BodyCircumferencesScreenState extends State<BodyCircumferencesScreen> {
|
||||
validateFields(state.chestCircumferenceController!.text, state.waistCircumferenceController!.text, state.hipCircumferenceController!.text);
|
||||
if (errors.isEmpty) {
|
||||
UserRegistrationSheet sheet = state.bodyCircumferencesModelObj!.userRegistrationSheet;
|
||||
sheet.chestCircumference = state.chestCircumferenceController!.text;
|
||||
sheet.waistCircumference = state.waistCircumferenceController!.text;
|
||||
sheet.hipCircumference = state.hipCircumferenceController!.text;
|
||||
// sheet.chestCircumference = state.chestCircumferenceController!.text;
|
||||
// sheet.waistCircumference = state.waistCircumferenceController!.text;
|
||||
// sheet.hipCircumference = state.hipCircumferenceController!.text;
|
||||
GoRouter.of(context).goNamed('weightScreen', extra: sheet);
|
||||
} else {
|
||||
String errorMessage = '';
|
||||
|
||||
@@ -27,7 +27,7 @@ class CityOfLivingBloc extends Bloc<CityOfLivingEvent, CityOfLivingState> {
|
||||
Emitter<CityOfLivingState> emit,
|
||||
) {
|
||||
emit(state.copyWith(selectedDropDownValue: event.value));
|
||||
state.cityOfLivingModelObj?.userRegistrationSheet.country =
|
||||
// state.cityOfLivingModelObj?.userRegistrationSheet.country =
|
||||
event.value.title;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ class CityOfLivingScreen extends StatelessWidget {
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 9.v),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 39.v),
|
||||
Text("place_of_living".tr, style: theme.textTheme.headlineSmall),
|
||||
SizedBox(height: 39.v),
|
||||
Text("country".tr, style: theme.textTheme.bodyLarge),
|
||||
|
||||
@@ -1,23 +1,34 @@
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
import 'bloc/credentials_bloc.dart';
|
||||
import 'models/credentials_model.dart';
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:validators/validators.dart';
|
||||
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
|
||||
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CredentialsScreen extends StatelessWidget {
|
||||
static Widget builder(BuildContext context, sheet) {
|
||||
return BlocProvider<CredentialsBloc>(
|
||||
create: (context) => CredentialsBloc(
|
||||
CredentialsState(
|
||||
credentialsModelObj: CredentialsModel(userRegistrationSheet: sheet),
|
||||
),
|
||||
)..add(CredentialsInitialEvent()),
|
||||
child: CredentialsScreen(),
|
||||
);
|
||||
class CredentialsScreen extends StatefulWidget {
|
||||
final UserRegistrationSheet sheet;
|
||||
|
||||
const CredentialsScreen({super.key, required this.sheet});
|
||||
|
||||
@override
|
||||
State<CredentialsScreen> createState() => _CredentialsScreenState();
|
||||
}
|
||||
|
||||
class _CredentialsScreenState extends State<CredentialsScreen> {
|
||||
final emailController = TextEditingController();
|
||||
|
||||
final nameController = TextEditingController();
|
||||
|
||||
final passwordController = TextEditingController();
|
||||
|
||||
final passwordConfirmationController = TextEditingController();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
emailController.text = widget.sheet.email;
|
||||
nameController.text = widget.sheet.name;
|
||||
passwordController.text = widget.sheet.password;
|
||||
passwordConfirmationController.text = widget.sheet.passwordConfirmation;
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -34,131 +45,51 @@ class CredentialsScreen extends StatelessWidget {
|
||||
SizedBox(height: 16.v),
|
||||
Text("email".tr, style: theme.textTheme.bodyLarge),
|
||||
SizedBox(height: 3.v),
|
||||
BlocSelector<CredentialsBloc, CredentialsState, TextEditingController?>(
|
||||
selector: (state) => state.emailController,
|
||||
builder: (context, emailController) {
|
||||
return CustomTextFormField(controller: emailController, textInputAction: TextInputAction.done);
|
||||
CustomTextFormField(
|
||||
controller: emailController,
|
||||
textInputAction: TextInputAction.done,
|
||||
onChanged: (newValue) {
|
||||
final registrationCubit = context.read<RegistrationCubit>();
|
||||
registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(email: newValue));
|
||||
},
|
||||
),
|
||||
SizedBox(height: 22.v),
|
||||
Text("username".tr, style: theme.textTheme.bodyLarge),
|
||||
SizedBox(height: 3.v),
|
||||
BlocSelector<CredentialsBloc, CredentialsState, TextEditingController?>(
|
||||
selector: (state) => state.nameController,
|
||||
builder: (context, nameController) {
|
||||
return CustomTextFormField(controller: nameController, textInputAction: TextInputAction.done);
|
||||
CustomTextFormField(
|
||||
controller: nameController,
|
||||
textInputAction: TextInputAction.done,
|
||||
onChanged: (newValue) {
|
||||
final registrationCubit = context.read<RegistrationCubit>();
|
||||
registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(name: newValue));
|
||||
},
|
||||
),
|
||||
SizedBox(height: 19.v),
|
||||
Text("password".tr, style: theme.textTheme.bodyLarge),
|
||||
SizedBox(height: 5.v),
|
||||
BlocSelector<CredentialsBloc, CredentialsState, TextEditingController?>(
|
||||
selector: (state) => state.passwordController,
|
||||
builder: (context, passwordController) {
|
||||
return CustomTextFormField(
|
||||
obscureText: true,
|
||||
controller: passwordController,
|
||||
);
|
||||
CustomTextFormField(
|
||||
obscureText: true,
|
||||
controller: passwordController,
|
||||
onChanged: (newValue) {
|
||||
final registrationCubit = context.read<RegistrationCubit>();
|
||||
registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(password: newValue));
|
||||
},
|
||||
),
|
||||
SizedBox(height: 21.v),
|
||||
Text("password_confirmation".tr, style: theme.textTheme.bodyLarge),
|
||||
SizedBox(height: 3.v),
|
||||
BlocSelector<CredentialsBloc, CredentialsState, TextEditingController?>(
|
||||
selector: (state) => state.passwordConfirmationController,
|
||||
builder: (context, passwordConfirmationController) {
|
||||
return CustomTextFormField(obscureText: true, controller: passwordConfirmationController, textInputAction: TextInputAction.done);
|
||||
CustomTextFormField(
|
||||
obscureText: true,
|
||||
controller: passwordConfirmationController,
|
||||
textInputAction: TextInputAction.done,
|
||||
onChanged: (newValue) {
|
||||
final registrationCubit = context.read<RegistrationCubit>();
|
||||
registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(passwordConfirmation: newValue));
|
||||
},
|
||||
),
|
||||
// BlocBuilder<CredentialsBloc, CredentialsState>(
|
||||
// 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: onTapContinue(state, context),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
onTapContinue(CredentialsState state, BuildContext context) {
|
||||
return () {
|
||||
List<String> errors =
|
||||
validateFields(state.emailController!.text, state.nameController!.text, state.passwordController!.text, state.passwordConfirmationController!.text);
|
||||
if (errors.isEmpty) {
|
||||
UserRegistrationSheet sheet = state.credentialsModelObj!.userRegistrationSheet;
|
||||
sheet.email = state.emailController!.text;
|
||||
sheet.name = state.nameController!.text;
|
||||
sheet.password = state.passwordController!.text;
|
||||
sheet.passwordConfirmation = state.passwordConfirmationController!.text;
|
||||
GoRouter.of(context).goNamed('nameScreen', extra: sheet);
|
||||
} else {
|
||||
String errorMessage = '';
|
||||
|
||||
for (var error in errors) {
|
||||
errorMessage += error + '\n\n';
|
||||
}
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text('Ошибка'),
|
||||
content: Text(errorMessage),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: onTapOk(context),
|
||||
child: Text('OK'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
onTapOk(BuildContext context) {
|
||||
return () {
|
||||
Navigator.pop(context);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
List<String> validateFields(String email, String name, String password, String passwordConfirmation) {
|
||||
List<String> errors = [];
|
||||
|
||||
if (!isEmail(email)) {
|
||||
errors.add('email_invalid'.tr);
|
||||
}
|
||||
|
||||
if (email.isEmpty) {
|
||||
errors.add('email_empty'.tr);
|
||||
}
|
||||
|
||||
if (name.length < 6) {
|
||||
errors.add('name_short'.tr);
|
||||
}
|
||||
|
||||
if (name.isEmpty) {
|
||||
errors.add('name_empty'.tr);
|
||||
}
|
||||
|
||||
if (password.isEmpty) {
|
||||
errors.add('name_empty'.tr);
|
||||
}
|
||||
|
||||
if (password.length < 6) {
|
||||
errors.add('password_short'.tr);
|
||||
}
|
||||
|
||||
if (password != passwordConfirmation) {
|
||||
errors.add('password_confirmation_mismatch'.tr);
|
||||
}
|
||||
|
||||
return errors;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ class _DateOfBirthScreenState extends State<DateOfBirthScreen> {
|
||||
onTapContinue(DateOfBirthState state, BuildContext context) {
|
||||
return () {
|
||||
UserRegistrationSheet sheet = state.dateOfBirthModelObj!.userRegistrationSheet;
|
||||
sheet.birthdate = selectedDate.toString();
|
||||
// sheet.birthdate = selectedDate.toString();
|
||||
GoRouter.of(context).goNamed('cityOfLivingScreen', extra: sheet);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -81,8 +81,8 @@ class _FavoriteFoodsScreenState extends State<FavoriteFoodsScreen> {
|
||||
onTapContinue(FavoriteFoodsState state, BuildContext context) {
|
||||
return () {
|
||||
UserRegistrationSheet sheet = state.favoriteFoodsModelObj!.userRegistrationSheet;
|
||||
sheet.favoriteFoods = state.favoriteFoodsController!.text;
|
||||
sheet.unfavoriteFoods = state.unfavoriteFoodsController!.text;
|
||||
// sheet.favoriteFoods = state.favoriteFoodsController!.text;
|
||||
// sheet.unfavoriteFoods = state.unfavoriteFoodsController!.text;
|
||||
GoRouter.of(context).goNamed('additionalInformationScreen', extra: sheet);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ class _FavoriteSportsScreenState extends State<FavoriteSportsScreen> {
|
||||
onTapContinue(FavoriteSportsState state, BuildContext context) {
|
||||
return () {
|
||||
UserRegistrationSheet sheet = state.favoriteSportsModelObj!.userRegistrationSheet;
|
||||
sheet.aboutSportHobbies = state.enterinformationController!.text;
|
||||
// sheet.aboutSportHobbies = state.enterinformationController!.text;
|
||||
GoRouter.of(context).goNamed('favoriteFoodsScreen', extra: sheet);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@ class GenderBloc extends Bloc<GenderEvent, GenderState> {
|
||||
Emitter<GenderState> emit,
|
||||
) {
|
||||
emit(state.copyWith(selectedRadioValue: event.value));
|
||||
state.genderModelObj?.userRegistrationSheet.gender = event.value;
|
||||
// state.genderModelObj?.userRegistrationSheet.gender = event.value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ class _GenderScreenState extends State<GenderScreen> {
|
||||
onTapNext(GenderState state, BuildContext context) {
|
||||
return () {
|
||||
UserRegistrationSheet sheet = state.genderModelObj!.userRegistrationSheet;
|
||||
sheet.gender = state.selectedRadioValue!;
|
||||
// sheet.gender = state.selectedRadioValue!;
|
||||
GoRouter.of(context).goNamed('dateOfBirthScreen', extra: sheet);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class HeightScreen extends StatelessWidget {
|
||||
"height_measurements".tr,
|
||||
style: theme.textTheme.headlineSmall,
|
||||
),
|
||||
SizedBox(height: 174.v),
|
||||
SizedBox(height: 16.v),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
|
||||
@@ -24,7 +24,7 @@ class LanguageSelectBloc extends Bloc<LanguageSelectEvent, LanguageSelectState>
|
||||
|
||||
_changeDropDown(ChangeDropDownEvent event, Emitter<LanguageSelectState> emit) {
|
||||
emit(state.copyWith(selectedDropDownValue: event.value));
|
||||
state.languageSelectModelObj?.userRegistrationSheet.lang = event.value.title;
|
||||
// state.languageSelectModelObj?.userRegistrationSheet.lang = event.value.title;
|
||||
}
|
||||
|
||||
List<SelectionPopupModel> fillDropdownItemList() {
|
||||
|
||||
@@ -1,21 +1,29 @@
|
||||
import 'bloc/language_select_bloc.dart';
|
||||
import 'models/language_select_model.dart';
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
|
||||
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
|
||||
import 'package:eatvio_app/widgets/custom_drop_down.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class LanguageSelectScreen extends StatelessWidget {
|
||||
const LanguageSelectScreen({Key? key}) : super(key: key);
|
||||
class LanguageSelectScreen extends StatefulWidget {
|
||||
final UserRegistrationSheet sheet;
|
||||
|
||||
static Widget builder(BuildContext context) {
|
||||
return BlocProvider<LanguageSelectBloc>(
|
||||
create: (context) => LanguageSelectBloc(
|
||||
LanguageSelectState(
|
||||
languageSelectModelObj: LanguageSelectModel(),
|
||||
),
|
||||
)..add(LanguageSelectInitialEvent()),
|
||||
child: LanguageSelectScreen(),
|
||||
);
|
||||
const LanguageSelectScreen({required this.sheet, super.key});
|
||||
|
||||
@override
|
||||
State<LanguageSelectScreen> createState() => _LanguageSelectScreenState();
|
||||
}
|
||||
|
||||
class _LanguageSelectScreenState extends State<LanguageSelectScreen> {
|
||||
final List<SelectionPopupModel> dropdownItemList = [
|
||||
SelectionPopupModel(id: 1, title: "Русский", isSelected: true),
|
||||
];
|
||||
|
||||
late SelectionPopupModel value;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
value = SelectionPopupModel(title: widget.sheet.lang);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -36,56 +44,28 @@ class LanguageSelectScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
BlocSelector<LanguageSelectBloc, LanguageSelectState, LanguageSelectModel?>(
|
||||
selector: (state) => state.languageSelectModelObj,
|
||||
builder: (
|
||||
context,
|
||||
languageSelectModelObj,
|
||||
) {
|
||||
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: "Не выбрано".tr,
|
||||
items: languageSelectModelObj?.dropdownItemList ?? [],
|
||||
onChanged: (value) => _onDropDownChanged(context, value),
|
||||
);
|
||||
},
|
||||
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: "Не выбрано".tr,
|
||||
items: dropdownItemList,
|
||||
onChanged: (SelectionPopupModel newValue) => setState(() {
|
||||
value = newValue;
|
||||
final registrationCubit = context.read<RegistrationCubit>();
|
||||
registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(lang: value.title));
|
||||
}),
|
||||
),
|
||||
// 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: _saveAndPush(state, context),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// void Function()? _saveAndPush(LanguageSelectState state, BuildContext context) {
|
||||
// return () {
|
||||
// UserRegistrationSheet sheet = state.languageSelectModelObj!.userRegistrationSheet;
|
||||
// GoRouter.of(context).goNamed(
|
||||
// 'credentialsScreen',
|
||||
// extra: sheet,
|
||||
// );
|
||||
// };
|
||||
// }
|
||||
|
||||
void _onDropDownChanged(BuildContext context, value) {
|
||||
context.read<LanguageSelectBloc>().add(ChangeDropDownEvent(value: value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:eatvio_app/data/models/selectionPopupModel/selection_popup_model
|
||||
/// 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(
|
||||
name: '',
|
||||
firstName: '',
|
||||
|
||||
@@ -82,7 +82,7 @@ class _MedicineIntakeScreenState extends State<MedicineIntakeScreen> {
|
||||
onTapNext(MedicineIntakeState state, BuildContext context) {
|
||||
return () {
|
||||
UserRegistrationSheet sheet = state.medicineIntakeModelObj!.userRegistrationSheet;
|
||||
sheet.aboutTakingPils = state.enterInformationController!.text;
|
||||
// sheet.aboutTakingPils = state.enterInformationController!.text;
|
||||
GoRouter.of(context).goNamed(
|
||||
'favoriteSportsScreen',
|
||||
extra: sheet,
|
||||
|
||||
@@ -29,7 +29,7 @@ class NameScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
children: [
|
||||
Text("what_is_your_name".tr, style: theme.textTheme.headlineSmall),
|
||||
SizedBox(height: 93.v),
|
||||
SizedBox(height: 16.v),
|
||||
Text("first_name".tr, style: theme.textTheme.bodyLarge),
|
||||
SizedBox(height: 3.v),
|
||||
BlocSelector<NameBloc, NameState, TextEditingController?>(
|
||||
|
||||
@@ -31,7 +31,7 @@ class WeightScreen extends StatelessWidget {
|
||||
"weight_measurements".tr,
|
||||
style: theme.textTheme.headlineSmall,
|
||||
),
|
||||
SizedBox(height: 174.v),
|
||||
SizedBox(height: 16.v),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
|
||||
Reference in New Issue
Block a user