forked from eatvio/eatvio_app
refactor(registration): remove username
This commit is contained in:
@@ -6,7 +6,6 @@ part 'user_registration_model.g.dart';
|
||||
@freezed
|
||||
class UserRegistrationSheet with _$UserRegistrationSheet {
|
||||
const factory UserRegistrationSheet({
|
||||
required String name,
|
||||
@JsonKey(name: 'first_name') required String firstName,
|
||||
@JsonKey(name: 'last_name') required String lastName,
|
||||
required String email,
|
||||
|
||||
@@ -21,7 +21,6 @@ UserRegistrationSheet _$UserRegistrationSheetFromJson(
|
||||
|
||||
/// @nodoc
|
||||
mixin _$UserRegistrationSheet {
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'first_name')
|
||||
String get firstName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'last_name')
|
||||
@@ -82,8 +81,7 @@ abstract class $UserRegistrationSheetCopyWith<$Res> {
|
||||
_$UserRegistrationSheetCopyWithImpl<$Res, UserRegistrationSheet>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{String name,
|
||||
@JsonKey(name: 'first_name') String firstName,
|
||||
{@JsonKey(name: 'first_name') String firstName,
|
||||
@JsonKey(name: 'last_name') String lastName,
|
||||
String email,
|
||||
String password,
|
||||
@@ -126,7 +124,6 @@ class _$UserRegistrationSheetCopyWithImpl<$Res,
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? name = null,
|
||||
Object? firstName = null,
|
||||
Object? lastName = null,
|
||||
Object? email = null,
|
||||
@@ -156,10 +153,6 @@ class _$UserRegistrationSheetCopyWithImpl<$Res,
|
||||
Object? activityCoefficient = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
firstName: null == firstName
|
||||
? _value.firstName
|
||||
: firstName // ignore: cast_nullable_to_non_nullable
|
||||
@@ -282,8 +275,7 @@ abstract class _$$UserRegistrationSheetImplCopyWith<$Res>
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{String name,
|
||||
@JsonKey(name: 'first_name') String firstName,
|
||||
{@JsonKey(name: 'first_name') String firstName,
|
||||
@JsonKey(name: 'last_name') String lastName,
|
||||
String email,
|
||||
String password,
|
||||
@@ -324,7 +316,6 @@ class __$$UserRegistrationSheetImplCopyWithImpl<$Res>
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? name = null,
|
||||
Object? firstName = null,
|
||||
Object? lastName = null,
|
||||
Object? email = null,
|
||||
@@ -354,10 +345,6 @@ class __$$UserRegistrationSheetImplCopyWithImpl<$Res>
|
||||
Object? activityCoefficient = null,
|
||||
}) {
|
||||
return _then(_$UserRegistrationSheetImpl(
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
firstName: null == firstName
|
||||
? _value.firstName
|
||||
: firstName // ignore: cast_nullable_to_non_nullable
|
||||
@@ -474,8 +461,7 @@ class __$$UserRegistrationSheetImplCopyWithImpl<$Res>
|
||||
@JsonSerializable()
|
||||
class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
|
||||
const _$UserRegistrationSheetImpl(
|
||||
{required this.name,
|
||||
@JsonKey(name: 'first_name') required this.firstName,
|
||||
{@JsonKey(name: 'first_name') required this.firstName,
|
||||
@JsonKey(name: 'last_name') required this.lastName,
|
||||
required this.email,
|
||||
required this.password,
|
||||
@@ -507,8 +493,6 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
|
||||
factory _$UserRegistrationSheetImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$UserRegistrationSheetImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String name;
|
||||
@override
|
||||
@JsonKey(name: 'first_name')
|
||||
final String firstName;
|
||||
@@ -585,7 +569,7 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UserRegistrationSheet(name: $name, firstName: $firstName, lastName: $lastName, email: $email, password: $password, passwordConfirmation: $passwordConfirmation, termsAccepted: $termsAccepted, birthdate: $birthdate, gender: $gender, location: $location, responseBody: $responseBody, lang: $lang, weight: $weight, height: $height, chestCircumference: $chestCircumference, waistCircumference: $waistCircumference, hipCircumference: $hipCircumference, bloodPressureUp: $bloodPressureUp, bloodPressureDown: $bloodPressureDown, hasHypo: $hasHypo, hasHyper: $hasHyper, aboutAllergy: $aboutAllergy, aboutTakingPils: $aboutTakingPils, aboutSportHobbies: $aboutSportHobbies, favoriteFoods: $favoriteFoods, unfavoriteFoods: $unfavoriteFoods, additionalInfo: $additionalInfo, activityCoefficient: $activityCoefficient)';
|
||||
return 'UserRegistrationSheet(firstName: $firstName, lastName: $lastName, email: $email, password: $password, passwordConfirmation: $passwordConfirmation, termsAccepted: $termsAccepted, birthdate: $birthdate, gender: $gender, location: $location, responseBody: $responseBody, lang: $lang, weight: $weight, height: $height, chestCircumference: $chestCircumference, waistCircumference: $waistCircumference, hipCircumference: $hipCircumference, bloodPressureUp: $bloodPressureUp, bloodPressureDown: $bloodPressureDown, hasHypo: $hasHypo, hasHyper: $hasHyper, aboutAllergy: $aboutAllergy, aboutTakingPils: $aboutTakingPils, aboutSportHobbies: $aboutSportHobbies, favoriteFoods: $favoriteFoods, unfavoriteFoods: $unfavoriteFoods, additionalInfo: $additionalInfo, activityCoefficient: $activityCoefficient)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -593,7 +577,6 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$UserRegistrationSheetImpl &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.firstName, firstName) ||
|
||||
other.firstName == firstName) &&
|
||||
(identical(other.lastName, lastName) ||
|
||||
@@ -648,7 +631,6 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
|
||||
@override
|
||||
int get hashCode => Object.hashAll([
|
||||
runtimeType,
|
||||
name,
|
||||
firstName,
|
||||
lastName,
|
||||
email,
|
||||
@@ -695,8 +677,7 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
|
||||
|
||||
abstract class _UserRegistrationSheet implements UserRegistrationSheet {
|
||||
const factory _UserRegistrationSheet(
|
||||
{required final String name,
|
||||
@JsonKey(name: 'first_name') required final String firstName,
|
||||
{@JsonKey(name: 'first_name') required final String firstName,
|
||||
@JsonKey(name: 'last_name') required final String lastName,
|
||||
required final String email,
|
||||
required final String password,
|
||||
@@ -733,8 +714,6 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet {
|
||||
factory _UserRegistrationSheet.fromJson(Map<String, dynamic> json) =
|
||||
_$UserRegistrationSheetImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
@override
|
||||
@JsonKey(name: 'first_name')
|
||||
String get firstName;
|
||||
|
||||
@@ -9,7 +9,6 @@ part of 'user_registration_model.dart';
|
||||
_$UserRegistrationSheetImpl _$$UserRegistrationSheetImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$UserRegistrationSheetImpl(
|
||||
name: json['name'] as String,
|
||||
firstName: json['first_name'] as String,
|
||||
lastName: json['last_name'] as String,
|
||||
email: json['email'] as String,
|
||||
@@ -43,7 +42,6 @@ _$UserRegistrationSheetImpl _$$UserRegistrationSheetImplFromJson(
|
||||
Map<String, dynamic> _$$UserRegistrationSheetImplToJson(
|
||||
_$UserRegistrationSheetImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'first_name': instance.firstName,
|
||||
'last_name': instance.lastName,
|
||||
'email': instance.email,
|
||||
|
||||
Reference in New Issue
Block a user