refactor: remove unused elements

This commit is contained in:
mso7nueh
2024-09-11 16:39:15 +03:00
parent 09cfacb022
commit 69472f422e
182 changed files with 2443 additions and 5482 deletions

View File

@@ -17,33 +17,35 @@ final _privateConstructorUsedError = UnsupportedError(
/// @nodoc
mixin _$SelectionPopupModel {
int? get id => throw _privateConstructorUsedError;
String get title => throw _privateConstructorUsedError;
dynamic get value => throw _privateConstructorUsedError;
bool get isSelected => throw _privateConstructorUsedError;
/// Create a copy of SelectionPopupModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$SelectionPopupModelCopyWith<SelectionPopupModel> get copyWith =>
throw _privateConstructorUsedError;
$SelectionPopupModelCopyWith<SelectionPopupModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $SelectionPopupModelCopyWith<$Res> {
factory $SelectionPopupModelCopyWith(
SelectionPopupModel value, $Res Function(SelectionPopupModel) then) =
factory $SelectionPopupModelCopyWith(SelectionPopupModel value, $Res Function(SelectionPopupModel) then) =
_$SelectionPopupModelCopyWithImpl<$Res, SelectionPopupModel>;
@useResult
$Res call({int? id, String title, dynamic value, bool isSelected});
}
/// @nodoc
class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel>
implements $SelectionPopupModelCopyWith<$Res> {
class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel> implements $SelectionPopupModelCopyWith<$Res> {
_$SelectionPopupModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -79,23 +81,19 @@ class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel>
}
/// @nodoc
abstract class _$$SelectionPopupModelImplCopyWith<$Res>
implements $SelectionPopupModelCopyWith<$Res> {
factory _$$SelectionPopupModelImplCopyWith(_$SelectionPopupModelImpl value,
$Res Function(_$SelectionPopupModelImpl) then) =
abstract class _$$SelectionPopupModelImplCopyWith<$Res> implements $SelectionPopupModelCopyWith<$Res> {
factory _$$SelectionPopupModelImplCopyWith(_$SelectionPopupModelImpl value, $Res Function(_$SelectionPopupModelImpl) then) =
__$$SelectionPopupModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({int? id, String title, dynamic value, bool isSelected});
}
/// @nodoc
class __$$SelectionPopupModelImplCopyWithImpl<$Res>
extends _$SelectionPopupModelCopyWithImpl<$Res, _$SelectionPopupModelImpl>
class __$$SelectionPopupModelImplCopyWithImpl<$Res> extends _$SelectionPopupModelCopyWithImpl<$Res, _$SelectionPopupModelImpl>
implements _$$SelectionPopupModelImplCopyWith<$Res> {
__$$SelectionPopupModelImplCopyWithImpl(_$SelectionPopupModelImpl _value,
$Res Function(_$SelectionPopupModelImpl) _then)
: super(_value, _then);
__$$SelectionPopupModelImplCopyWithImpl(_$SelectionPopupModelImpl _value, $Res Function(_$SelectionPopupModelImpl) _then) : super(_value, _then);
/// Create a copy of SelectionPopupModel
/// with the given fields replaced by the non-null parameter values.
@@ -131,8 +129,7 @@ class __$$SelectionPopupModelImplCopyWithImpl<$Res>
/// @nodoc
class _$SelectionPopupModelImpl implements _SelectionPopupModel {
const _$SelectionPopupModelImpl(
{this.id, required this.title, this.value, this.isSelected = false});
const _$SelectionPopupModelImpl({this.id, required this.title, this.value, this.isSelected = false});
@override
final int? id;
@@ -157,13 +154,11 @@ class _$SelectionPopupModelImpl implements _SelectionPopupModel {
(identical(other.id, id) || other.id == id) &&
(identical(other.title, title) || other.title == title) &&
const DeepCollectionEquality().equals(other.value, value) &&
(identical(other.isSelected, isSelected) ||
other.isSelected == isSelected));
(identical(other.isSelected, isSelected) || other.isSelected == isSelected));
}
@override
int get hashCode => Object.hash(runtimeType, id, title,
const DeepCollectionEquality().hash(value), isSelected);
int get hashCode => Object.hash(runtimeType, id, title, const DeepCollectionEquality().hash(value), isSelected);
/// Create a copy of SelectionPopupModel
/// with the given fields replaced by the non-null parameter values.
@@ -171,23 +166,21 @@ class _$SelectionPopupModelImpl implements _SelectionPopupModel {
@override
@pragma('vm:prefer-inline')
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
__$$SelectionPopupModelImplCopyWithImpl<_$SelectionPopupModelImpl>(
this, _$identity);
__$$SelectionPopupModelImplCopyWithImpl<_$SelectionPopupModelImpl>(this, _$identity);
}
abstract class _SelectionPopupModel implements SelectionPopupModel {
const factory _SelectionPopupModel(
{final int? id,
required final String title,
final dynamic value,
final bool isSelected}) = _$SelectionPopupModelImpl;
const factory _SelectionPopupModel({final int? id, required final String title, final dynamic value, final bool isSelected}) = _$SelectionPopupModelImpl;
@override
int? get id;
@override
String get title;
@override
dynamic get value;
@override
bool get isSelected;
@@ -195,6 +188,5 @@ abstract class _SelectionPopupModel implements SelectionPopupModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -1,39 +0,0 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'user_registration_model.freezed.dart';
part 'user_registration_model.g.dart';
@freezed
class UserRegistrationSheet with _$UserRegistrationSheet {
const factory UserRegistrationSheet({
@JsonKey(name: 'first_name') required String firstName,
@JsonKey(name: 'last_name') required String lastName,
required String email,
required String password,
@JsonKey(name: 'password_confirmation') required String passwordConfirmation,
@Default('accepted') @JsonKey(name: 'terms') String termsAccepted,
required String birthdate,
required String gender,
required String location,
@JsonKey(name: 'response_body') required String responseBody,
required String lang,
required int weight,
required int height,
@JsonKey(name: 'chest_circumference') required int chestCircumference,
@JsonKey(name: 'waist_circumference') required int waistCircumference,
@JsonKey(name: 'hip_circumference') required int hipCircumference,
@JsonKey(name: 'blood_pressure_up') required int bloodPressureUp,
@JsonKey(name: 'blood_pressure_down') required int bloodPressureDown,
@JsonKey(name: 'has_hypo') required int hasHypo,
@JsonKey(name: 'has_hyper') required int hasHyper,
@JsonKey(name: 'about_alergy') required String aboutAllergy,
@JsonKey(name: 'about_taking_pils') required String aboutTakingPils,
@JsonKey(name: 'about_sport_hobbies') required String aboutSportHobbies,
@JsonKey(name: 'favorite_foods') required String favoriteFoods,
@JsonKey(name: 'unfavorite_foods') required String unfavoriteFoods,
@JsonKey(name: 'additional_info') required String additionalInfo,
@Default(1.2) @JsonKey(name: 'activity_coefficient') double activityCoefficient,
}) = _UserRegistrationSheet;
factory UserRegistrationSheet.fromJson(Map<String, Object?> json) => _$UserRegistrationSheetFromJson(json);
}

View File

@@ -1,807 +0,0 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'user_registration_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
UserRegistrationSheet _$UserRegistrationSheetFromJson(
Map<String, dynamic> json) {
return _UserRegistrationSheet.fromJson(json);
}
/// @nodoc
mixin _$UserRegistrationSheet {
@JsonKey(name: 'first_name')
String get firstName => throw _privateConstructorUsedError;
@JsonKey(name: 'last_name')
String get lastName => throw _privateConstructorUsedError;
String get email => throw _privateConstructorUsedError;
String get password => throw _privateConstructorUsedError;
@JsonKey(name: 'password_confirmation')
String get passwordConfirmation => throw _privateConstructorUsedError;
@JsonKey(name: 'terms')
String get termsAccepted => throw _privateConstructorUsedError;
String get birthdate => throw _privateConstructorUsedError;
String get gender => throw _privateConstructorUsedError;
String get location => throw _privateConstructorUsedError;
@JsonKey(name: 'response_body')
String get responseBody => throw _privateConstructorUsedError;
String get lang => throw _privateConstructorUsedError;
int get weight => throw _privateConstructorUsedError;
int get height => throw _privateConstructorUsedError;
@JsonKey(name: 'chest_circumference')
int get chestCircumference => throw _privateConstructorUsedError;
@JsonKey(name: 'waist_circumference')
int get waistCircumference => throw _privateConstructorUsedError;
@JsonKey(name: 'hip_circumference')
int get hipCircumference => throw _privateConstructorUsedError;
@JsonKey(name: 'blood_pressure_up')
int get bloodPressureUp => throw _privateConstructorUsedError;
@JsonKey(name: 'blood_pressure_down')
int get bloodPressureDown => throw _privateConstructorUsedError;
@JsonKey(name: 'has_hypo')
int get hasHypo => throw _privateConstructorUsedError;
@JsonKey(name: 'has_hyper')
int get hasHyper => throw _privateConstructorUsedError;
@JsonKey(name: 'about_alergy')
String get aboutAllergy => throw _privateConstructorUsedError;
@JsonKey(name: 'about_taking_pils')
String get aboutTakingPils => throw _privateConstructorUsedError;
@JsonKey(name: 'about_sport_hobbies')
String get aboutSportHobbies => throw _privateConstructorUsedError;
@JsonKey(name: 'favorite_foods')
String get favoriteFoods => throw _privateConstructorUsedError;
@JsonKey(name: 'unfavorite_foods')
String get unfavoriteFoods => throw _privateConstructorUsedError;
@JsonKey(name: 'additional_info')
String get additionalInfo => throw _privateConstructorUsedError;
@JsonKey(name: 'activity_coefficient')
double get activityCoefficient => throw _privateConstructorUsedError;
/// Serializes this UserRegistrationSheet to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of UserRegistrationSheet
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$UserRegistrationSheetCopyWith<UserRegistrationSheet> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $UserRegistrationSheetCopyWith<$Res> {
factory $UserRegistrationSheetCopyWith(UserRegistrationSheet value,
$Res Function(UserRegistrationSheet) then) =
_$UserRegistrationSheetCopyWithImpl<$Res, UserRegistrationSheet>;
@useResult
$Res call(
{@JsonKey(name: 'first_name') String firstName,
@JsonKey(name: 'last_name') String lastName,
String email,
String password,
@JsonKey(name: 'password_confirmation') String passwordConfirmation,
@JsonKey(name: 'terms') String termsAccepted,
String birthdate,
String gender,
String location,
@JsonKey(name: 'response_body') String responseBody,
String lang,
int weight,
int height,
@JsonKey(name: 'chest_circumference') int chestCircumference,
@JsonKey(name: 'waist_circumference') int waistCircumference,
@JsonKey(name: 'hip_circumference') int hipCircumference,
@JsonKey(name: 'blood_pressure_up') int bloodPressureUp,
@JsonKey(name: 'blood_pressure_down') int bloodPressureDown,
@JsonKey(name: 'has_hypo') int hasHypo,
@JsonKey(name: 'has_hyper') int hasHyper,
@JsonKey(name: 'about_alergy') String aboutAllergy,
@JsonKey(name: 'about_taking_pils') String aboutTakingPils,
@JsonKey(name: 'about_sport_hobbies') String aboutSportHobbies,
@JsonKey(name: 'favorite_foods') String favoriteFoods,
@JsonKey(name: 'unfavorite_foods') String unfavoriteFoods,
@JsonKey(name: 'additional_info') String additionalInfo,
@JsonKey(name: 'activity_coefficient') double activityCoefficient});
}
/// @nodoc
class _$UserRegistrationSheetCopyWithImpl<$Res,
$Val extends UserRegistrationSheet>
implements $UserRegistrationSheetCopyWith<$Res> {
_$UserRegistrationSheetCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of UserRegistrationSheet
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? firstName = null,
Object? lastName = null,
Object? email = null,
Object? password = null,
Object? passwordConfirmation = null,
Object? termsAccepted = null,
Object? birthdate = null,
Object? gender = null,
Object? location = null,
Object? responseBody = null,
Object? lang = null,
Object? weight = null,
Object? height = null,
Object? chestCircumference = null,
Object? waistCircumference = null,
Object? hipCircumference = null,
Object? bloodPressureUp = null,
Object? bloodPressureDown = null,
Object? hasHypo = null,
Object? hasHyper = null,
Object? aboutAllergy = null,
Object? aboutTakingPils = null,
Object? aboutSportHobbies = null,
Object? favoriteFoods = null,
Object? unfavoriteFoods = null,
Object? additionalInfo = null,
Object? activityCoefficient = null,
}) {
return _then(_value.copyWith(
firstName: null == firstName
? _value.firstName
: firstName // ignore: cast_nullable_to_non_nullable
as String,
lastName: null == lastName
? _value.lastName
: lastName // ignore: cast_nullable_to_non_nullable
as String,
email: null == email
? _value.email
: email // ignore: cast_nullable_to_non_nullable
as String,
password: null == password
? _value.password
: password // ignore: cast_nullable_to_non_nullable
as String,
passwordConfirmation: null == passwordConfirmation
? _value.passwordConfirmation
: passwordConfirmation // ignore: cast_nullable_to_non_nullable
as String,
termsAccepted: null == termsAccepted
? _value.termsAccepted
: termsAccepted // ignore: cast_nullable_to_non_nullable
as String,
birthdate: null == birthdate
? _value.birthdate
: birthdate // ignore: cast_nullable_to_non_nullable
as String,
gender: null == gender
? _value.gender
: gender // ignore: cast_nullable_to_non_nullable
as String,
location: null == location
? _value.location
: location // ignore: cast_nullable_to_non_nullable
as String,
responseBody: null == responseBody
? _value.responseBody
: responseBody // ignore: cast_nullable_to_non_nullable
as String,
lang: null == lang
? _value.lang
: lang // ignore: cast_nullable_to_non_nullable
as String,
weight: null == weight
? _value.weight
: weight // ignore: cast_nullable_to_non_nullable
as int,
height: null == height
? _value.height
: height // ignore: cast_nullable_to_non_nullable
as int,
chestCircumference: null == chestCircumference
? _value.chestCircumference
: chestCircumference // ignore: cast_nullable_to_non_nullable
as int,
waistCircumference: null == waistCircumference
? _value.waistCircumference
: waistCircumference // ignore: cast_nullable_to_non_nullable
as int,
hipCircumference: null == hipCircumference
? _value.hipCircumference
: hipCircumference // ignore: cast_nullable_to_non_nullable
as int,
bloodPressureUp: null == bloodPressureUp
? _value.bloodPressureUp
: bloodPressureUp // ignore: cast_nullable_to_non_nullable
as int,
bloodPressureDown: null == bloodPressureDown
? _value.bloodPressureDown
: bloodPressureDown // ignore: cast_nullable_to_non_nullable
as int,
hasHypo: null == hasHypo
? _value.hasHypo
: hasHypo // ignore: cast_nullable_to_non_nullable
as int,
hasHyper: null == hasHyper
? _value.hasHyper
: hasHyper // ignore: cast_nullable_to_non_nullable
as int,
aboutAllergy: null == aboutAllergy
? _value.aboutAllergy
: aboutAllergy // ignore: cast_nullable_to_non_nullable
as String,
aboutTakingPils: null == aboutTakingPils
? _value.aboutTakingPils
: aboutTakingPils // ignore: cast_nullable_to_non_nullable
as String,
aboutSportHobbies: null == aboutSportHobbies
? _value.aboutSportHobbies
: aboutSportHobbies // ignore: cast_nullable_to_non_nullable
as String,
favoriteFoods: null == favoriteFoods
? _value.favoriteFoods
: favoriteFoods // ignore: cast_nullable_to_non_nullable
as String,
unfavoriteFoods: null == unfavoriteFoods
? _value.unfavoriteFoods
: unfavoriteFoods // ignore: cast_nullable_to_non_nullable
as String,
additionalInfo: null == additionalInfo
? _value.additionalInfo
: additionalInfo // ignore: cast_nullable_to_non_nullable
as String,
activityCoefficient: null == activityCoefficient
? _value.activityCoefficient
: activityCoefficient // ignore: cast_nullable_to_non_nullable
as double,
) as $Val);
}
}
/// @nodoc
abstract class _$$UserRegistrationSheetImplCopyWith<$Res>
implements $UserRegistrationSheetCopyWith<$Res> {
factory _$$UserRegistrationSheetImplCopyWith(
_$UserRegistrationSheetImpl value,
$Res Function(_$UserRegistrationSheetImpl) then) =
__$$UserRegistrationSheetImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: 'first_name') String firstName,
@JsonKey(name: 'last_name') String lastName,
String email,
String password,
@JsonKey(name: 'password_confirmation') String passwordConfirmation,
@JsonKey(name: 'terms') String termsAccepted,
String birthdate,
String gender,
String location,
@JsonKey(name: 'response_body') String responseBody,
String lang,
int weight,
int height,
@JsonKey(name: 'chest_circumference') int chestCircumference,
@JsonKey(name: 'waist_circumference') int waistCircumference,
@JsonKey(name: 'hip_circumference') int hipCircumference,
@JsonKey(name: 'blood_pressure_up') int bloodPressureUp,
@JsonKey(name: 'blood_pressure_down') int bloodPressureDown,
@JsonKey(name: 'has_hypo') int hasHypo,
@JsonKey(name: 'has_hyper') int hasHyper,
@JsonKey(name: 'about_alergy') String aboutAllergy,
@JsonKey(name: 'about_taking_pils') String aboutTakingPils,
@JsonKey(name: 'about_sport_hobbies') String aboutSportHobbies,
@JsonKey(name: 'favorite_foods') String favoriteFoods,
@JsonKey(name: 'unfavorite_foods') String unfavoriteFoods,
@JsonKey(name: 'additional_info') String additionalInfo,
@JsonKey(name: 'activity_coefficient') double activityCoefficient});
}
/// @nodoc
class __$$UserRegistrationSheetImplCopyWithImpl<$Res>
extends _$UserRegistrationSheetCopyWithImpl<$Res,
_$UserRegistrationSheetImpl>
implements _$$UserRegistrationSheetImplCopyWith<$Res> {
__$$UserRegistrationSheetImplCopyWithImpl(_$UserRegistrationSheetImpl _value,
$Res Function(_$UserRegistrationSheetImpl) _then)
: super(_value, _then);
/// Create a copy of UserRegistrationSheet
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? firstName = null,
Object? lastName = null,
Object? email = null,
Object? password = null,
Object? passwordConfirmation = null,
Object? termsAccepted = null,
Object? birthdate = null,
Object? gender = null,
Object? location = null,
Object? responseBody = null,
Object? lang = null,
Object? weight = null,
Object? height = null,
Object? chestCircumference = null,
Object? waistCircumference = null,
Object? hipCircumference = null,
Object? bloodPressureUp = null,
Object? bloodPressureDown = null,
Object? hasHypo = null,
Object? hasHyper = null,
Object? aboutAllergy = null,
Object? aboutTakingPils = null,
Object? aboutSportHobbies = null,
Object? favoriteFoods = null,
Object? unfavoriteFoods = null,
Object? additionalInfo = null,
Object? activityCoefficient = null,
}) {
return _then(_$UserRegistrationSheetImpl(
firstName: null == firstName
? _value.firstName
: firstName // ignore: cast_nullable_to_non_nullable
as String,
lastName: null == lastName
? _value.lastName
: lastName // ignore: cast_nullable_to_non_nullable
as String,
email: null == email
? _value.email
: email // ignore: cast_nullable_to_non_nullable
as String,
password: null == password
? _value.password
: password // ignore: cast_nullable_to_non_nullable
as String,
passwordConfirmation: null == passwordConfirmation
? _value.passwordConfirmation
: passwordConfirmation // ignore: cast_nullable_to_non_nullable
as String,
termsAccepted: null == termsAccepted
? _value.termsAccepted
: termsAccepted // ignore: cast_nullable_to_non_nullable
as String,
birthdate: null == birthdate
? _value.birthdate
: birthdate // ignore: cast_nullable_to_non_nullable
as String,
gender: null == gender
? _value.gender
: gender // ignore: cast_nullable_to_non_nullable
as String,
location: null == location
? _value.location
: location // ignore: cast_nullable_to_non_nullable
as String,
responseBody: null == responseBody
? _value.responseBody
: responseBody // ignore: cast_nullable_to_non_nullable
as String,
lang: null == lang
? _value.lang
: lang // ignore: cast_nullable_to_non_nullable
as String,
weight: null == weight
? _value.weight
: weight // ignore: cast_nullable_to_non_nullable
as int,
height: null == height
? _value.height
: height // ignore: cast_nullable_to_non_nullable
as int,
chestCircumference: null == chestCircumference
? _value.chestCircumference
: chestCircumference // ignore: cast_nullable_to_non_nullable
as int,
waistCircumference: null == waistCircumference
? _value.waistCircumference
: waistCircumference // ignore: cast_nullable_to_non_nullable
as int,
hipCircumference: null == hipCircumference
? _value.hipCircumference
: hipCircumference // ignore: cast_nullable_to_non_nullable
as int,
bloodPressureUp: null == bloodPressureUp
? _value.bloodPressureUp
: bloodPressureUp // ignore: cast_nullable_to_non_nullable
as int,
bloodPressureDown: null == bloodPressureDown
? _value.bloodPressureDown
: bloodPressureDown // ignore: cast_nullable_to_non_nullable
as int,
hasHypo: null == hasHypo
? _value.hasHypo
: hasHypo // ignore: cast_nullable_to_non_nullable
as int,
hasHyper: null == hasHyper
? _value.hasHyper
: hasHyper // ignore: cast_nullable_to_non_nullable
as int,
aboutAllergy: null == aboutAllergy
? _value.aboutAllergy
: aboutAllergy // ignore: cast_nullable_to_non_nullable
as String,
aboutTakingPils: null == aboutTakingPils
? _value.aboutTakingPils
: aboutTakingPils // ignore: cast_nullable_to_non_nullable
as String,
aboutSportHobbies: null == aboutSportHobbies
? _value.aboutSportHobbies
: aboutSportHobbies // ignore: cast_nullable_to_non_nullable
as String,
favoriteFoods: null == favoriteFoods
? _value.favoriteFoods
: favoriteFoods // ignore: cast_nullable_to_non_nullable
as String,
unfavoriteFoods: null == unfavoriteFoods
? _value.unfavoriteFoods
: unfavoriteFoods // ignore: cast_nullable_to_non_nullable
as String,
additionalInfo: null == additionalInfo
? _value.additionalInfo
: additionalInfo // ignore: cast_nullable_to_non_nullable
as String,
activityCoefficient: null == activityCoefficient
? _value.activityCoefficient
: activityCoefficient // ignore: cast_nullable_to_non_nullable
as double,
));
}
}
/// @nodoc
@JsonSerializable()
class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
const _$UserRegistrationSheetImpl(
{@JsonKey(name: 'first_name') required this.firstName,
@JsonKey(name: 'last_name') required this.lastName,
required this.email,
required this.password,
@JsonKey(name: 'password_confirmation')
required this.passwordConfirmation,
@JsonKey(name: 'terms') this.termsAccepted = 'accepted',
required this.birthdate,
required this.gender,
required this.location,
@JsonKey(name: 'response_body') required this.responseBody,
required this.lang,
required this.weight,
required this.height,
@JsonKey(name: 'chest_circumference') required this.chestCircumference,
@JsonKey(name: 'waist_circumference') required this.waistCircumference,
@JsonKey(name: 'hip_circumference') required this.hipCircumference,
@JsonKey(name: 'blood_pressure_up') required this.bloodPressureUp,
@JsonKey(name: 'blood_pressure_down') required this.bloodPressureDown,
@JsonKey(name: 'has_hypo') required this.hasHypo,
@JsonKey(name: 'has_hyper') required this.hasHyper,
@JsonKey(name: 'about_alergy') required this.aboutAllergy,
@JsonKey(name: 'about_taking_pils') required this.aboutTakingPils,
@JsonKey(name: 'about_sport_hobbies') required this.aboutSportHobbies,
@JsonKey(name: 'favorite_foods') required this.favoriteFoods,
@JsonKey(name: 'unfavorite_foods') required this.unfavoriteFoods,
@JsonKey(name: 'additional_info') required this.additionalInfo,
@JsonKey(name: 'activity_coefficient') this.activityCoefficient = 1.2});
factory _$UserRegistrationSheetImpl.fromJson(Map<String, dynamic> json) =>
_$$UserRegistrationSheetImplFromJson(json);
@override
@JsonKey(name: 'first_name')
final String firstName;
@override
@JsonKey(name: 'last_name')
final String lastName;
@override
final String email;
@override
final String password;
@override
@JsonKey(name: 'password_confirmation')
final String passwordConfirmation;
@override
@JsonKey(name: 'terms')
final String termsAccepted;
@override
final String birthdate;
@override
final String gender;
@override
final String location;
@override
@JsonKey(name: 'response_body')
final String responseBody;
@override
final String lang;
@override
final int weight;
@override
final int height;
@override
@JsonKey(name: 'chest_circumference')
final int chestCircumference;
@override
@JsonKey(name: 'waist_circumference')
final int waistCircumference;
@override
@JsonKey(name: 'hip_circumference')
final int hipCircumference;
@override
@JsonKey(name: 'blood_pressure_up')
final int bloodPressureUp;
@override
@JsonKey(name: 'blood_pressure_down')
final int bloodPressureDown;
@override
@JsonKey(name: 'has_hypo')
final int hasHypo;
@override
@JsonKey(name: 'has_hyper')
final int hasHyper;
@override
@JsonKey(name: 'about_alergy')
final String aboutAllergy;
@override
@JsonKey(name: 'about_taking_pils')
final String aboutTakingPils;
@override
@JsonKey(name: 'about_sport_hobbies')
final String aboutSportHobbies;
@override
@JsonKey(name: 'favorite_foods')
final String favoriteFoods;
@override
@JsonKey(name: 'unfavorite_foods')
final String unfavoriteFoods;
@override
@JsonKey(name: 'additional_info')
final String additionalInfo;
@override
@JsonKey(name: 'activity_coefficient')
final double activityCoefficient;
@override
String toString() {
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
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$UserRegistrationSheetImpl &&
(identical(other.firstName, firstName) ||
other.firstName == firstName) &&
(identical(other.lastName, lastName) ||
other.lastName == lastName) &&
(identical(other.email, email) || other.email == email) &&
(identical(other.password, password) ||
other.password == password) &&
(identical(other.passwordConfirmation, passwordConfirmation) ||
other.passwordConfirmation == passwordConfirmation) &&
(identical(other.termsAccepted, termsAccepted) ||
other.termsAccepted == termsAccepted) &&
(identical(other.birthdate, birthdate) ||
other.birthdate == birthdate) &&
(identical(other.gender, gender) || other.gender == gender) &&
(identical(other.location, location) ||
other.location == location) &&
(identical(other.responseBody, responseBody) ||
other.responseBody == responseBody) &&
(identical(other.lang, lang) || other.lang == lang) &&
(identical(other.weight, weight) || other.weight == weight) &&
(identical(other.height, height) || other.height == height) &&
(identical(other.chestCircumference, chestCircumference) ||
other.chestCircumference == chestCircumference) &&
(identical(other.waistCircumference, waistCircumference) ||
other.waistCircumference == waistCircumference) &&
(identical(other.hipCircumference, hipCircumference) ||
other.hipCircumference == hipCircumference) &&
(identical(other.bloodPressureUp, bloodPressureUp) ||
other.bloodPressureUp == bloodPressureUp) &&
(identical(other.bloodPressureDown, bloodPressureDown) ||
other.bloodPressureDown == bloodPressureDown) &&
(identical(other.hasHypo, hasHypo) || other.hasHypo == hasHypo) &&
(identical(other.hasHyper, hasHyper) ||
other.hasHyper == hasHyper) &&
(identical(other.aboutAllergy, aboutAllergy) ||
other.aboutAllergy == aboutAllergy) &&
(identical(other.aboutTakingPils, aboutTakingPils) ||
other.aboutTakingPils == aboutTakingPils) &&
(identical(other.aboutSportHobbies, aboutSportHobbies) ||
other.aboutSportHobbies == aboutSportHobbies) &&
(identical(other.favoriteFoods, favoriteFoods) ||
other.favoriteFoods == favoriteFoods) &&
(identical(other.unfavoriteFoods, unfavoriteFoods) ||
other.unfavoriteFoods == unfavoriteFoods) &&
(identical(other.additionalInfo, additionalInfo) ||
other.additionalInfo == additionalInfo) &&
(identical(other.activityCoefficient, activityCoefficient) ||
other.activityCoefficient == activityCoefficient));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([
runtimeType,
firstName,
lastName,
email,
password,
passwordConfirmation,
termsAccepted,
birthdate,
gender,
location,
responseBody,
lang,
weight,
height,
chestCircumference,
waistCircumference,
hipCircumference,
bloodPressureUp,
bloodPressureDown,
hasHypo,
hasHyper,
aboutAllergy,
aboutTakingPils,
aboutSportHobbies,
favoriteFoods,
unfavoriteFoods,
additionalInfo,
activityCoefficient
]);
/// Create a copy of UserRegistrationSheet
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
get copyWith => __$$UserRegistrationSheetImplCopyWithImpl<
_$UserRegistrationSheetImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$UserRegistrationSheetImplToJson(
this,
);
}
}
abstract class _UserRegistrationSheet implements UserRegistrationSheet {
const factory _UserRegistrationSheet(
{@JsonKey(name: 'first_name') required final String firstName,
@JsonKey(name: 'last_name') required final String lastName,
required final String email,
required final String password,
@JsonKey(name: 'password_confirmation')
required final String passwordConfirmation,
@JsonKey(name: 'terms') final String termsAccepted,
required final String birthdate,
required final String gender,
required final String location,
@JsonKey(name: 'response_body') required final String responseBody,
required final String lang,
required final int weight,
required final int height,
@JsonKey(name: 'chest_circumference')
required final int chestCircumference,
@JsonKey(name: 'waist_circumference')
required final int waistCircumference,
@JsonKey(name: 'hip_circumference') required final int hipCircumference,
@JsonKey(name: 'blood_pressure_up') required final int bloodPressureUp,
@JsonKey(name: 'blood_pressure_down')
required final int bloodPressureDown,
@JsonKey(name: 'has_hypo') required final int hasHypo,
@JsonKey(name: 'has_hyper') required final int hasHyper,
@JsonKey(name: 'about_alergy') required final String aboutAllergy,
@JsonKey(name: 'about_taking_pils') required final String aboutTakingPils,
@JsonKey(name: 'about_sport_hobbies')
required final String aboutSportHobbies,
@JsonKey(name: 'favorite_foods') required final String favoriteFoods,
@JsonKey(name: 'unfavorite_foods') required final String unfavoriteFoods,
@JsonKey(name: 'additional_info') required final String additionalInfo,
@JsonKey(name: 'activity_coefficient')
final double activityCoefficient}) = _$UserRegistrationSheetImpl;
factory _UserRegistrationSheet.fromJson(Map<String, dynamic> json) =
_$UserRegistrationSheetImpl.fromJson;
@override
@JsonKey(name: 'first_name')
String get firstName;
@override
@JsonKey(name: 'last_name')
String get lastName;
@override
String get email;
@override
String get password;
@override
@JsonKey(name: 'password_confirmation')
String get passwordConfirmation;
@override
@JsonKey(name: 'terms')
String get termsAccepted;
@override
String get birthdate;
@override
String get gender;
@override
String get location;
@override
@JsonKey(name: 'response_body')
String get responseBody;
@override
String get lang;
@override
int get weight;
@override
int get height;
@override
@JsonKey(name: 'chest_circumference')
int get chestCircumference;
@override
@JsonKey(name: 'waist_circumference')
int get waistCircumference;
@override
@JsonKey(name: 'hip_circumference')
int get hipCircumference;
@override
@JsonKey(name: 'blood_pressure_up')
int get bloodPressureUp;
@override
@JsonKey(name: 'blood_pressure_down')
int get bloodPressureDown;
@override
@JsonKey(name: 'has_hypo')
int get hasHypo;
@override
@JsonKey(name: 'has_hyper')
int get hasHyper;
@override
@JsonKey(name: 'about_alergy')
String get aboutAllergy;
@override
@JsonKey(name: 'about_taking_pils')
String get aboutTakingPils;
@override
@JsonKey(name: 'about_sport_hobbies')
String get aboutSportHobbies;
@override
@JsonKey(name: 'favorite_foods')
String get favoriteFoods;
@override
@JsonKey(name: 'unfavorite_foods')
String get unfavoriteFoods;
@override
@JsonKey(name: 'additional_info')
String get additionalInfo;
@override
@JsonKey(name: 'activity_coefficient')
double get activityCoefficient;
/// Create a copy of UserRegistrationSheet
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -1,72 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'user_registration_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_$UserRegistrationSheetImpl _$$UserRegistrationSheetImplFromJson(
Map<String, dynamic> json) =>
_$UserRegistrationSheetImpl(
firstName: json['first_name'] as String,
lastName: json['last_name'] as String,
email: json['email'] as String,
password: json['password'] as String,
passwordConfirmation: json['password_confirmation'] as String,
termsAccepted: json['terms'] as String? ?? 'accepted',
birthdate: json['birthdate'] as String,
gender: json['gender'] as String,
location: json['location'] as String,
responseBody: json['response_body'] as String,
lang: json['lang'] as String,
weight: (json['weight'] as num).toInt(),
height: (json['height'] as num).toInt(),
chestCircumference: (json['chest_circumference'] as num).toInt(),
waistCircumference: (json['waist_circumference'] as num).toInt(),
hipCircumference: (json['hip_circumference'] as num).toInt(),
bloodPressureUp: (json['blood_pressure_up'] as num).toInt(),
bloodPressureDown: (json['blood_pressure_down'] as num).toInt(),
hasHypo: (json['has_hypo'] as num).toInt(),
hasHyper: (json['has_hyper'] as num).toInt(),
aboutAllergy: json['about_alergy'] as String,
aboutTakingPils: json['about_taking_pils'] as String,
aboutSportHobbies: json['about_sport_hobbies'] as String,
favoriteFoods: json['favorite_foods'] as String,
unfavoriteFoods: json['unfavorite_foods'] as String,
additionalInfo: json['additional_info'] as String,
activityCoefficient:
(json['activity_coefficient'] as num?)?.toDouble() ?? 1.2,
);
Map<String, dynamic> _$$UserRegistrationSheetImplToJson(
_$UserRegistrationSheetImpl instance) =>
<String, dynamic>{
'first_name': instance.firstName,
'last_name': instance.lastName,
'email': instance.email,
'password': instance.password,
'password_confirmation': instance.passwordConfirmation,
'terms': instance.termsAccepted,
'birthdate': instance.birthdate,
'gender': instance.gender,
'location': instance.location,
'response_body': instance.responseBody,
'lang': instance.lang,
'weight': instance.weight,
'height': instance.height,
'chest_circumference': instance.chestCircumference,
'waist_circumference': instance.waistCircumference,
'hip_circumference': instance.hipCircumference,
'blood_pressure_up': instance.bloodPressureUp,
'blood_pressure_down': instance.bloodPressureDown,
'has_hypo': instance.hasHypo,
'has_hyper': instance.hasHyper,
'about_alergy': instance.aboutAllergy,
'about_taking_pils': instance.aboutTakingPils,
'about_sport_hobbies': instance.aboutSportHobbies,
'favorite_foods': instance.favoriteFoods,
'unfavorite_foods': instance.unfavoriteFoods,
'additional_info': instance.additionalInfo,
'activity_coefficient': instance.activityCoefficient,
};