forked from eatvio/eatvio_app
Some further logic fixes
This commit is contained in:
@@ -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: () {
|
||||
|
||||
Reference in New Issue
Block a user