fix: remove ignored files

This commit is contained in:
mso7nueh
2025-04-18 12:36:11 +03:00
parent 2ba130f875
commit 93236783c7
726 changed files with 818 additions and 131628 deletions

View File

@@ -1,242 +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 'badge_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');
BadgeModel _$BadgeModelFromJson(Map<String, dynamic> json) {
return _BadgeModel.fromJson(json);
}
/// @nodoc
mixin _$BadgeModel {
int get id => throw _privateConstructorUsedError;
String get title => throw _privateConstructorUsedError;
String get description => throw _privateConstructorUsedError;
String get image => throw _privateConstructorUsedError;
String get type => throw _privateConstructorUsedError;
/// Serializes this BadgeModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of BadgeModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$BadgeModelCopyWith<BadgeModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $BadgeModelCopyWith<$Res> {
factory $BadgeModelCopyWith(
BadgeModel value, $Res Function(BadgeModel) then) =
_$BadgeModelCopyWithImpl<$Res, BadgeModel>;
@useResult
$Res call(
{int id, String title, String description, String image, String type});
}
/// @nodoc
class _$BadgeModelCopyWithImpl<$Res, $Val extends BadgeModel>
implements $BadgeModelCopyWith<$Res> {
_$BadgeModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of BadgeModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? title = null,
Object? description = null,
Object? image = null,
Object? type = null,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
description: null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
image: null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
type: null == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String,
) as $Val);
}
}
/// @nodoc
abstract class _$$BadgeModelImplCopyWith<$Res>
implements $BadgeModelCopyWith<$Res> {
factory _$$BadgeModelImplCopyWith(
_$BadgeModelImpl value, $Res Function(_$BadgeModelImpl) then) =
__$$BadgeModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id, String title, String description, String image, String type});
}
/// @nodoc
class __$$BadgeModelImplCopyWithImpl<$Res>
extends _$BadgeModelCopyWithImpl<$Res, _$BadgeModelImpl>
implements _$$BadgeModelImplCopyWith<$Res> {
__$$BadgeModelImplCopyWithImpl(
_$BadgeModelImpl _value, $Res Function(_$BadgeModelImpl) _then)
: super(_value, _then);
/// Create a copy of BadgeModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? title = null,
Object? description = null,
Object? image = null,
Object? type = null,
}) {
return _then(_$BadgeModelImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
description: null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
image: null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
type: null == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
@JsonSerializable()
class _$BadgeModelImpl implements _BadgeModel {
const _$BadgeModelImpl(
{required this.id,
required this.title,
required this.description,
required this.image,
required this.type});
factory _$BadgeModelImpl.fromJson(Map<String, dynamic> json) =>
_$$BadgeModelImplFromJson(json);
@override
final int id;
@override
final String title;
@override
final String description;
@override
final String image;
@override
final String type;
@override
String toString() {
return 'BadgeModel(id: $id, title: $title, description: $description, image: $image, type: $type)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$BadgeModelImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.description, description) ||
other.description == description) &&
(identical(other.image, image) || other.image == image) &&
(identical(other.type, type) || other.type == type));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
Object.hash(runtimeType, id, title, description, image, type);
/// Create a copy of BadgeModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$BadgeModelImplCopyWith<_$BadgeModelImpl> get copyWith =>
__$$BadgeModelImplCopyWithImpl<_$BadgeModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$BadgeModelImplToJson(
this,
);
}
}
abstract class _BadgeModel implements BadgeModel {
const factory _BadgeModel(
{required final int id,
required final String title,
required final String description,
required final String image,
required final String type}) = _$BadgeModelImpl;
factory _BadgeModel.fromJson(Map<String, dynamic> json) =
_$BadgeModelImpl.fromJson;
@override
int get id;
@override
String get title;
@override
String get description;
@override
String get image;
@override
String get type;
/// Create a copy of BadgeModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$BadgeModelImplCopyWith<_$BadgeModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@@ -1,25 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'badge_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_$BadgeModelImpl _$$BadgeModelImplFromJson(Map<String, dynamic> json) =>
_$BadgeModelImpl(
id: (json['id'] as num).toInt(),
title: json['title'] as String,
description: json['description'] as String,
image: json['image'] as String,
type: json['type'] as String,
);
Map<String, dynamic> _$$BadgeModelImplToJson(_$BadgeModelImpl instance) =>
<String, dynamic>{
'id': instance.id,
'title': instance.title,
'description': instance.description,
'image': instance.image,
'type': instance.type,
};

View File

@@ -1,441 +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 'chosen_diets_pagination_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');
ChosenDietsPaginationModel _$ChosenDietsPaginationModelFromJson(
Map<String, dynamic> json) {
return _ChosenDietsPaginationModel.fromJson(json);
}
/// @nodoc
mixin _$ChosenDietsPaginationModel {
@JsonKey(name: 'data')
List<ChosenDietModel> get diets => throw _privateConstructorUsedError;
/// Serializes this ChosenDietsPaginationModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of ChosenDietsPaginationModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ChosenDietsPaginationModelCopyWith<ChosenDietsPaginationModel>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ChosenDietsPaginationModelCopyWith<$Res> {
factory $ChosenDietsPaginationModelCopyWith(ChosenDietsPaginationModel value,
$Res Function(ChosenDietsPaginationModel) then) =
_$ChosenDietsPaginationModelCopyWithImpl<$Res,
ChosenDietsPaginationModel>;
@useResult
$Res call({@JsonKey(name: 'data') List<ChosenDietModel> diets});
}
/// @nodoc
class _$ChosenDietsPaginationModelCopyWithImpl<$Res,
$Val extends ChosenDietsPaginationModel>
implements $ChosenDietsPaginationModelCopyWith<$Res> {
_$ChosenDietsPaginationModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ChosenDietsPaginationModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? diets = null,
}) {
return _then(_value.copyWith(
diets: null == diets
? _value.diets
: diets // ignore: cast_nullable_to_non_nullable
as List<ChosenDietModel>,
) as $Val);
}
}
/// @nodoc
abstract class _$$ChosenDietsPaginationModelImplCopyWith<$Res>
implements $ChosenDietsPaginationModelCopyWith<$Res> {
factory _$$ChosenDietsPaginationModelImplCopyWith(
_$ChosenDietsPaginationModelImpl value,
$Res Function(_$ChosenDietsPaginationModelImpl) then) =
__$$ChosenDietsPaginationModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({@JsonKey(name: 'data') List<ChosenDietModel> diets});
}
/// @nodoc
class __$$ChosenDietsPaginationModelImplCopyWithImpl<$Res>
extends _$ChosenDietsPaginationModelCopyWithImpl<$Res,
_$ChosenDietsPaginationModelImpl>
implements _$$ChosenDietsPaginationModelImplCopyWith<$Res> {
__$$ChosenDietsPaginationModelImplCopyWithImpl(
_$ChosenDietsPaginationModelImpl _value,
$Res Function(_$ChosenDietsPaginationModelImpl) _then)
: super(_value, _then);
/// Create a copy of ChosenDietsPaginationModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? diets = null,
}) {
return _then(_$ChosenDietsPaginationModelImpl(
diets: null == diets
? _value._diets
: diets // ignore: cast_nullable_to_non_nullable
as List<ChosenDietModel>,
));
}
}
/// @nodoc
@JsonSerializable()
class _$ChosenDietsPaginationModelImpl implements _ChosenDietsPaginationModel {
_$ChosenDietsPaginationModelImpl(
{@JsonKey(name: 'data') required final List<ChosenDietModel> diets})
: _diets = diets;
factory _$ChosenDietsPaginationModelImpl.fromJson(
Map<String, dynamic> json) =>
_$$ChosenDietsPaginationModelImplFromJson(json);
final List<ChosenDietModel> _diets;
@override
@JsonKey(name: 'data')
List<ChosenDietModel> get diets {
if (_diets is EqualUnmodifiableListView) return _diets;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_diets);
}
@override
String toString() {
return 'ChosenDietsPaginationModel(diets: $diets)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChosenDietsPaginationModelImpl &&
const DeepCollectionEquality().equals(other._diets, _diets));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
Object.hash(runtimeType, const DeepCollectionEquality().hash(_diets));
/// Create a copy of ChosenDietsPaginationModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ChosenDietsPaginationModelImplCopyWith<_$ChosenDietsPaginationModelImpl>
get copyWith => __$$ChosenDietsPaginationModelImplCopyWithImpl<
_$ChosenDietsPaginationModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$ChosenDietsPaginationModelImplToJson(
this,
);
}
}
abstract class _ChosenDietsPaginationModel
implements ChosenDietsPaginationModel {
factory _ChosenDietsPaginationModel(
{@JsonKey(name: 'data') required final List<ChosenDietModel> diets}) =
_$ChosenDietsPaginationModelImpl;
factory _ChosenDietsPaginationModel.fromJson(Map<String, dynamic> json) =
_$ChosenDietsPaginationModelImpl.fromJson;
@override
@JsonKey(name: 'data')
List<ChosenDietModel> get diets;
/// Create a copy of ChosenDietsPaginationModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChosenDietsPaginationModelImplCopyWith<_$ChosenDietsPaginationModelImpl>
get copyWith => throw _privateConstructorUsedError;
}
ChosenDietModel _$ChosenDietModelFromJson(Map<String, dynamic> json) {
return _ChosenDietModel.fromJson(json);
}
/// @nodoc
mixin _$ChosenDietModel {
@JsonKey(name: 'id')
int get chosenDietID => throw _privateConstructorUsedError;
@JsonKey(name: 'chosen_plan_id')
int get chosenPlanId => throw _privateConstructorUsedError;
@JsonKey()
String get state => throw _privateConstructorUsedError;
@JsonKey(name: 'start_date', fromJson: parseDate)
DateTime get startDate => throw _privateConstructorUsedError;
@JsonKey(name: 'diet', fromJson: _parseDietId)
int? get dietId => throw _privateConstructorUsedError;
/// Serializes this ChosenDietModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of ChosenDietModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ChosenDietModelCopyWith<ChosenDietModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ChosenDietModelCopyWith<$Res> {
factory $ChosenDietModelCopyWith(
ChosenDietModel value, $Res Function(ChosenDietModel) then) =
_$ChosenDietModelCopyWithImpl<$Res, ChosenDietModel>;
@useResult
$Res call(
{@JsonKey(name: 'id') int chosenDietID,
@JsonKey(name: 'chosen_plan_id') int chosenPlanId,
@JsonKey() String state,
@JsonKey(name: 'start_date', fromJson: parseDate) DateTime startDate,
@JsonKey(name: 'diet', fromJson: _parseDietId) int? dietId});
}
/// @nodoc
class _$ChosenDietModelCopyWithImpl<$Res, $Val extends ChosenDietModel>
implements $ChosenDietModelCopyWith<$Res> {
_$ChosenDietModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ChosenDietModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? chosenDietID = null,
Object? chosenPlanId = null,
Object? state = null,
Object? startDate = null,
Object? dietId = freezed,
}) {
return _then(_value.copyWith(
chosenDietID: null == chosenDietID
? _value.chosenDietID
: chosenDietID // ignore: cast_nullable_to_non_nullable
as int,
chosenPlanId: null == chosenPlanId
? _value.chosenPlanId
: chosenPlanId // ignore: cast_nullable_to_non_nullable
as int,
state: null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String,
startDate: null == startDate
? _value.startDate
: startDate // ignore: cast_nullable_to_non_nullable
as DateTime,
dietId: freezed == dietId
? _value.dietId
: dietId // ignore: cast_nullable_to_non_nullable
as int?,
) as $Val);
}
}
/// @nodoc
abstract class _$$ChosenDietModelImplCopyWith<$Res>
implements $ChosenDietModelCopyWith<$Res> {
factory _$$ChosenDietModelImplCopyWith(_$ChosenDietModelImpl value,
$Res Function(_$ChosenDietModelImpl) then) =
__$$ChosenDietModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: 'id') int chosenDietID,
@JsonKey(name: 'chosen_plan_id') int chosenPlanId,
@JsonKey() String state,
@JsonKey(name: 'start_date', fromJson: parseDate) DateTime startDate,
@JsonKey(name: 'diet', fromJson: _parseDietId) int? dietId});
}
/// @nodoc
class __$$ChosenDietModelImplCopyWithImpl<$Res>
extends _$ChosenDietModelCopyWithImpl<$Res, _$ChosenDietModelImpl>
implements _$$ChosenDietModelImplCopyWith<$Res> {
__$$ChosenDietModelImplCopyWithImpl(
_$ChosenDietModelImpl _value, $Res Function(_$ChosenDietModelImpl) _then)
: super(_value, _then);
/// Create a copy of ChosenDietModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? chosenDietID = null,
Object? chosenPlanId = null,
Object? state = null,
Object? startDate = null,
Object? dietId = freezed,
}) {
return _then(_$ChosenDietModelImpl(
chosenDietID: null == chosenDietID
? _value.chosenDietID
: chosenDietID // ignore: cast_nullable_to_non_nullable
as int,
chosenPlanId: null == chosenPlanId
? _value.chosenPlanId
: chosenPlanId // ignore: cast_nullable_to_non_nullable
as int,
state: null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String,
startDate: null == startDate
? _value.startDate
: startDate // ignore: cast_nullable_to_non_nullable
as DateTime,
dietId: freezed == dietId
? _value.dietId
: dietId // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$ChosenDietModelImpl implements _ChosenDietModel {
_$ChosenDietModelImpl(
{@JsonKey(name: 'id') required this.chosenDietID,
@JsonKey(name: 'chosen_plan_id') required this.chosenPlanId,
@JsonKey() required this.state,
@JsonKey(name: 'start_date', fromJson: parseDate) required this.startDate,
@JsonKey(name: 'diet', fromJson: _parseDietId) required this.dietId});
factory _$ChosenDietModelImpl.fromJson(Map<String, dynamic> json) =>
_$$ChosenDietModelImplFromJson(json);
@override
@JsonKey(name: 'id')
final int chosenDietID;
@override
@JsonKey(name: 'chosen_plan_id')
final int chosenPlanId;
@override
@JsonKey()
final String state;
@override
@JsonKey(name: 'start_date', fromJson: parseDate)
final DateTime startDate;
@override
@JsonKey(name: 'diet', fromJson: _parseDietId)
final int? dietId;
@override
String toString() {
return 'ChosenDietModel(chosenDietID: $chosenDietID, chosenPlanId: $chosenPlanId, state: $state, startDate: $startDate, dietId: $dietId)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChosenDietModelImpl &&
(identical(other.chosenDietID, chosenDietID) ||
other.chosenDietID == chosenDietID) &&
(identical(other.chosenPlanId, chosenPlanId) ||
other.chosenPlanId == chosenPlanId) &&
(identical(other.state, state) || other.state == state) &&
(identical(other.startDate, startDate) ||
other.startDate == startDate) &&
(identical(other.dietId, dietId) || other.dietId == dietId));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, chosenDietID, chosenPlanId, state, startDate, dietId);
/// Create a copy of ChosenDietModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ChosenDietModelImplCopyWith<_$ChosenDietModelImpl> get copyWith =>
__$$ChosenDietModelImplCopyWithImpl<_$ChosenDietModelImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$ChosenDietModelImplToJson(
this,
);
}
}
abstract class _ChosenDietModel implements ChosenDietModel {
factory _ChosenDietModel(
{@JsonKey(name: 'id') required final int chosenDietID,
@JsonKey(name: 'chosen_plan_id') required final int chosenPlanId,
@JsonKey() required final String state,
@JsonKey(name: 'start_date', fromJson: parseDate)
required final DateTime startDate,
@JsonKey(name: 'diet', fromJson: _parseDietId)
required final int? dietId}) = _$ChosenDietModelImpl;
factory _ChosenDietModel.fromJson(Map<String, dynamic> json) =
_$ChosenDietModelImpl.fromJson;
@override
@JsonKey(name: 'id')
int get chosenDietID;
@override
@JsonKey(name: 'chosen_plan_id')
int get chosenPlanId;
@override
@JsonKey()
String get state;
@override
@JsonKey(name: 'start_date', fromJson: parseDate)
DateTime get startDate;
@override
@JsonKey(name: 'diet', fromJson: _parseDietId)
int? get dietId;
/// Create a copy of ChosenDietModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChosenDietModelImplCopyWith<_$ChosenDietModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@@ -1,41 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'chosen_diets_pagination_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_$ChosenDietsPaginationModelImpl _$$ChosenDietsPaginationModelImplFromJson(
Map<String, dynamic> json) =>
_$ChosenDietsPaginationModelImpl(
diets: (json['data'] as List<dynamic>)
.map((e) => ChosenDietModel.fromJson(e as Map<String, dynamic>))
.toList(),
);
Map<String, dynamic> _$$ChosenDietsPaginationModelImplToJson(
_$ChosenDietsPaginationModelImpl instance) =>
<String, dynamic>{
'data': instance.diets,
};
_$ChosenDietModelImpl _$$ChosenDietModelImplFromJson(
Map<String, dynamic> json) =>
_$ChosenDietModelImpl(
chosenDietID: (json['id'] as num).toInt(),
chosenPlanId: (json['chosen_plan_id'] as num).toInt(),
state: json['state'] as String,
startDate: parseDate(json['start_date'] as String),
dietId: _parseDietId(json['diet']),
);
Map<String, dynamic> _$$ChosenDietModelImplToJson(
_$ChosenDietModelImpl instance) =>
<String, dynamic>{
'id': instance.chosenDietID,
'chosen_plan_id': instance.chosenPlanId,
'state': instance.state,
'start_date': instance.startDate.toIso8601String(),
'diet': instance.dietId,
};

View File

@@ -1,319 +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 'circumference_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');
CircumferenceModel _$CircumferenceModelFromJson(Map<String, dynamic> json) {
return _CircumferenceModel.fromJson(json);
}
/// @nodoc
mixin _$CircumferenceModel {
@JsonKey(name: "id")
int get id => throw _privateConstructorUsedError;
@JsonKey(name: "user_id")
int get userId => 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: "created_at")
DateTime get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at")
DateTime get updatedAt => throw _privateConstructorUsedError;
/// Serializes this CircumferenceModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of CircumferenceModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$CircumferenceModelCopyWith<CircumferenceModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $CircumferenceModelCopyWith<$Res> {
factory $CircumferenceModelCopyWith(
CircumferenceModel value, $Res Function(CircumferenceModel) then) =
_$CircumferenceModelCopyWithImpl<$Res, CircumferenceModel>;
@useResult
$Res call(
{@JsonKey(name: "id") int id,
@JsonKey(name: "user_id") int userId,
@JsonKey(name: "chest_circumference") int chestCircumference,
@JsonKey(name: "waist_circumference") int waistCircumference,
@JsonKey(name: "hip_circumference") int hipCircumference,
@JsonKey(name: "created_at") DateTime createdAt,
@JsonKey(name: "updated_at") DateTime updatedAt});
}
/// @nodoc
class _$CircumferenceModelCopyWithImpl<$Res, $Val extends CircumferenceModel>
implements $CircumferenceModelCopyWith<$Res> {
_$CircumferenceModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of CircumferenceModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? userId = null,
Object? chestCircumference = null,
Object? waistCircumference = null,
Object? hipCircumference = null,
Object? createdAt = null,
Object? updatedAt = null,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
userId: null == userId
? _value.userId
: userId // 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,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
) as $Val);
}
}
/// @nodoc
abstract class _$$CircumferenceModelImplCopyWith<$Res>
implements $CircumferenceModelCopyWith<$Res> {
factory _$$CircumferenceModelImplCopyWith(_$CircumferenceModelImpl value,
$Res Function(_$CircumferenceModelImpl) then) =
__$$CircumferenceModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: "id") int id,
@JsonKey(name: "user_id") int userId,
@JsonKey(name: "chest_circumference") int chestCircumference,
@JsonKey(name: "waist_circumference") int waistCircumference,
@JsonKey(name: "hip_circumference") int hipCircumference,
@JsonKey(name: "created_at") DateTime createdAt,
@JsonKey(name: "updated_at") DateTime updatedAt});
}
/// @nodoc
class __$$CircumferenceModelImplCopyWithImpl<$Res>
extends _$CircumferenceModelCopyWithImpl<$Res, _$CircumferenceModelImpl>
implements _$$CircumferenceModelImplCopyWith<$Res> {
__$$CircumferenceModelImplCopyWithImpl(_$CircumferenceModelImpl _value,
$Res Function(_$CircumferenceModelImpl) _then)
: super(_value, _then);
/// Create a copy of CircumferenceModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? userId = null,
Object? chestCircumference = null,
Object? waistCircumference = null,
Object? hipCircumference = null,
Object? createdAt = null,
Object? updatedAt = null,
}) {
return _then(_$CircumferenceModelImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
userId: null == userId
? _value.userId
: userId // 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,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
));
}
}
/// @nodoc
@JsonSerializable()
class _$CircumferenceModelImpl implements _CircumferenceModel {
const _$CircumferenceModelImpl(
{@JsonKey(name: "id") required this.id,
@JsonKey(name: "user_id") required this.userId,
@JsonKey(name: "chest_circumference") required this.chestCircumference,
@JsonKey(name: "waist_circumference") required this.waistCircumference,
@JsonKey(name: "hip_circumference") required this.hipCircumference,
@JsonKey(name: "created_at") required this.createdAt,
@JsonKey(name: "updated_at") required this.updatedAt});
factory _$CircumferenceModelImpl.fromJson(Map<String, dynamic> json) =>
_$$CircumferenceModelImplFromJson(json);
@override
@JsonKey(name: "id")
final int id;
@override
@JsonKey(name: "user_id")
final int userId;
@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: "created_at")
final DateTime createdAt;
@override
@JsonKey(name: "updated_at")
final DateTime updatedAt;
@override
String toString() {
return 'CircumferenceModel(id: $id, userId: $userId, chestCircumference: $chestCircumference, waistCircumference: $waistCircumference, hipCircumference: $hipCircumference, createdAt: $createdAt, updatedAt: $updatedAt)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CircumferenceModelImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.userId, userId) || other.userId == userId) &&
(identical(other.chestCircumference, chestCircumference) ||
other.chestCircumference == chestCircumference) &&
(identical(other.waistCircumference, waistCircumference) ||
other.waistCircumference == waistCircumference) &&
(identical(other.hipCircumference, hipCircumference) ||
other.hipCircumference == hipCircumference) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, id, userId, chestCircumference,
waistCircumference, hipCircumference, createdAt, updatedAt);
/// Create a copy of CircumferenceModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$CircumferenceModelImplCopyWith<_$CircumferenceModelImpl> get copyWith =>
__$$CircumferenceModelImplCopyWithImpl<_$CircumferenceModelImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$CircumferenceModelImplToJson(
this,
);
}
}
abstract class _CircumferenceModel implements CircumferenceModel {
const factory _CircumferenceModel(
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "user_id") required final int userId,
@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: "created_at") required final DateTime createdAt,
@JsonKey(name: "updated_at")
required final DateTime updatedAt}) = _$CircumferenceModelImpl;
factory _CircumferenceModel.fromJson(Map<String, dynamic> json) =
_$CircumferenceModelImpl.fromJson;
@override
@JsonKey(name: "id")
int get id;
@override
@JsonKey(name: "user_id")
int get userId;
@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: "created_at")
DateTime get createdAt;
@override
@JsonKey(name: "updated_at")
DateTime get updatedAt;
/// Create a copy of CircumferenceModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CircumferenceModelImplCopyWith<_$CircumferenceModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@@ -1,31 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'circumference_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_$CircumferenceModelImpl _$$CircumferenceModelImplFromJson(
Map<String, dynamic> json) =>
_$CircumferenceModelImpl(
id: (json['id'] as num).toInt(),
userId: (json['user_id'] as num).toInt(),
chestCircumference: (json['chest_circumference'] as num).toInt(),
waistCircumference: (json['waist_circumference'] as num).toInt(),
hipCircumference: (json['hip_circumference'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String),
);
Map<String, dynamic> _$$CircumferenceModelImplToJson(
_$CircumferenceModelImpl instance) =>
<String, dynamic>{
'id': instance.id,
'user_id': instance.userId,
'chest_circumference': instance.chestCircumference,
'waist_circumference': instance.waistCircumference,
'hip_circumference': instance.hipCircumference,
'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(),
};

File diff suppressed because it is too large Load Diff

View File

@@ -1,205 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'profile_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_$ProfileModelImpl _$$ProfileModelImplFromJson(Map<String, dynamic> json) =>
_$ProfileModelImpl(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
email: json['email'] as String,
ratingPlace: (json['rating_place'] as num?)?.toInt(),
emailVerifiedAt: json['email_verified_at'] == null
? null
: DateTime.parse(json['email_verified_at'] as String),
createdAt: json['created_at'] == null
? null
: DateTime.parse(json['created_at'] as String),
updatedAt: json['updated_at'] == null
? null
: DateTime.parse(json['updated_at'] as String),
isPublicProfile: parseBool(json['is_public_profile']),
isEntitySubscribedByMe: json['is_entity_subscribed_by_me'] as bool,
slug: json['slug'] as String,
profilePhotoUrl: json['profile_photo_url'] as String,
roles: (json['roles'] as List<dynamic>).map((e) => e as String).toList(),
badges: (json['badges'] as List<dynamic>)
.map((e) => BadgeModel.fromJson(e as Map<String, dynamic>))
.toList(),
subscriptions: (json['subscriptions'] as List<dynamic>)
.map((e) => ProfilePreviewModel.fromJson(e as Map<String, dynamic>))
.toList(),
subscribers: (json['subscribers'] as List<dynamic>)
.map((e) => ProfilePreviewModel.fromJson(e as Map<String, dynamic>))
.toList(),
educationResource: json['education_resource'] == null
? null
: EducationModel.fromJson(
json['education_resource'] as Map<String, dynamic>),
diplomasAndCertificates: (json['cert_photos'] as List<dynamic>?)
?.map((e) =>
DiplomasAndCertificatesModel.fromJson(e as Map<String, dynamic>))
.toList(),
);
Map<String, dynamic> _$$ProfileModelImplToJson(_$ProfileModelImpl instance) =>
<String, dynamic>{
'id': instance.id,
'name': instance.name,
'email': instance.email,
'rating_place': instance.ratingPlace,
'email_verified_at': instance.emailVerifiedAt?.toIso8601String(),
'created_at': instance.createdAt?.toIso8601String(),
'updated_at': instance.updatedAt?.toIso8601String(),
'is_public_profile': instance.isPublicProfile,
'is_entity_subscribed_by_me': instance.isEntitySubscribedByMe,
'slug': instance.slug,
'profile_photo_url': instance.profilePhotoUrl,
'roles': instance.roles,
'badges': instance.badges,
'subscriptions': instance.subscriptions,
'subscribers': instance.subscribers,
'education_resource': instance.educationResource,
'cert_photos': instance.diplomasAndCertificates,
};
_$DiplomasAndCertificatesModelImpl _$$DiplomasAndCertificatesModelImplFromJson(
Map<String, dynamic> json) =>
_$DiplomasAndCertificatesModelImpl(
id: (json['id'] as num).toInt(),
path: json['path'] as String,
);
Map<String, dynamic> _$$DiplomasAndCertificatesModelImplToJson(
_$DiplomasAndCertificatesModelImpl instance) =>
<String, dynamic>{
'id': instance.id,
'path': instance.path,
};
_$EducationModelImpl _$$EducationModelImplFromJson(Map<String, dynamic> json) =>
_$EducationModelImpl(
hasMedicalEducation: (json['has_medical_education'] as num?)?.toInt(),
completedCourses: (json['completed_cources'] as List<dynamic>?)
?.map((e) => (e as Map<String, dynamic>).map(
(k, e) => MapEntry(k,
CompletedCoursesModel.fromJson(e as Map<String, dynamic>)),
))
.toList(),
vkLink: json['vk_link'] as String?,
instaLink: json['insta_link'] as String?,
fbLink: json['fb_link'] as String?,
tgLink: json['tg_link'] as String?,
personalSiteLink: json['personal_site_link'] as String?,
requestState: json['request_state'] as String?,
);
Map<String, dynamic> _$$EducationModelImplToJson(
_$EducationModelImpl instance) =>
<String, dynamic>{
'has_medical_education': instance.hasMedicalEducation,
'completed_cources': instance.completedCourses,
'vk_link': instance.vkLink,
'insta_link': instance.instaLink,
'fb_link': instance.fbLink,
'tg_link': instance.tgLink,
'personal_site_link': instance.personalSiteLink,
'request_state': instance.requestState,
};
_$CompletedCoursesModelImpl _$$CompletedCoursesModelImplFromJson(
Map<String, dynamic> json) =>
_$CompletedCoursesModelImpl(
date: json['date'] as String,
title: json['title'] as String,
);
Map<String, dynamic> _$$CompletedCoursesModelImplToJson(
_$CompletedCoursesModelImpl instance) =>
<String, dynamic>{
'date': instance.date,
'title': instance.title,
};
_$ProfileDetailsModelImpl _$$ProfileDetailsModelImplFromJson(
Map<String, dynamic> json) =>
_$ProfileDetailsModelImpl(
firstName: json['first_name'] as String,
lastName: json['last_name'] as String,
birthdate: json['birthdate'] as String,
gender: json['gender'] as String,
country: json['country'] as String,
city: json['city'] as String,
lang: json['lang'] as String,
weight: (json['weight'] as num).toDouble(),
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 bool,
hasHyper: json['has_hyper'] as bool,
aboutAlergy: 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,
createdAt: json['created_at'] == null
? null
: DateTime.parse(json['created_at'] as String),
updatedAt: json['updated_at'] == null
? null
: DateTime.parse(json['updated_at'] as String),
isMoodFillable: json['is_mood_fillable'] as bool,
isBedtimeFillable: json['is_bedtime_fillable'] as bool,
activityCoefficient: (json['activity_coefficient'] as num).toDouble(),
);
Map<String, dynamic> _$$ProfileDetailsModelImplToJson(
_$ProfileDetailsModelImpl instance) =>
<String, dynamic>{
'first_name': instance.firstName,
'last_name': instance.lastName,
'birthdate': instance.birthdate,
'gender': instance.gender,
'country': instance.country,
'city': instance.city,
'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.aboutAlergy,
'about_taking_pils': instance.aboutTakingPils,
'about_sport_hobbies': instance.aboutSportHobbies,
'favorite_foods': instance.favoriteFoods,
'unfavorite_foods': instance.unfavoriteFoods,
'additional_info': instance.additionalInfo,
'created_at': instance.createdAt?.toIso8601String(),
'updated_at': instance.updatedAt?.toIso8601String(),
'is_mood_fillable': instance.isMoodFillable,
'is_bedtime_fillable': instance.isBedtimeFillable,
'activity_coefficient': instance.activityCoefficient,
};
_$ProfilePreviewModelImpl _$$ProfilePreviewModelImplFromJson(
Map<String, dynamic> json) =>
_$ProfilePreviewModelImpl(
profilePhotoUrl: json['profile_photo_url'] as String,
);
Map<String, dynamic> _$$ProfilePreviewModelImplToJson(
_$ProfilePreviewModelImpl instance) =>
<String, dynamic>{
'profile_photo_url': instance.profilePhotoUrl,
};

View File

@@ -1,648 +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 'sub_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');
SubPaginationModel _$SubPaginationModelFromJson(Map<String, dynamic> json) {
return _SubPaginationModel.fromJson(json);
}
/// @nodoc
mixin _$SubPaginationModel {
List<SubModel> get data => throw _privateConstructorUsedError;
Links get links => throw _privateConstructorUsedError;
Meta get meta => throw _privateConstructorUsedError;
/// Serializes this SubPaginationModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SubPaginationModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$SubPaginationModelCopyWith<SubPaginationModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $SubPaginationModelCopyWith<$Res> {
factory $SubPaginationModelCopyWith(
SubPaginationModel value, $Res Function(SubPaginationModel) then) =
_$SubPaginationModelCopyWithImpl<$Res, SubPaginationModel>;
@useResult
$Res call({List<SubModel> data, Links links, Meta meta});
$LinksCopyWith<$Res> get links;
$MetaCopyWith<$Res> get meta;
}
/// @nodoc
class _$SubPaginationModelCopyWithImpl<$Res, $Val extends SubPaginationModel>
implements $SubPaginationModelCopyWith<$Res> {
_$SubPaginationModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SubPaginationModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? data = null,
Object? links = null,
Object? meta = null,
}) {
return _then(_value.copyWith(
data: null == data
? _value.data
: data // ignore: cast_nullable_to_non_nullable
as List<SubModel>,
links: null == links
? _value.links
: links // ignore: cast_nullable_to_non_nullable
as Links,
meta: null == meta
? _value.meta
: meta // ignore: cast_nullable_to_non_nullable
as Meta,
) as $Val);
}
/// Create a copy of SubPaginationModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$LinksCopyWith<$Res> get links {
return $LinksCopyWith<$Res>(_value.links, (value) {
return _then(_value.copyWith(links: value) as $Val);
});
}
/// Create a copy of SubPaginationModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$MetaCopyWith<$Res> get meta {
return $MetaCopyWith<$Res>(_value.meta, (value) {
return _then(_value.copyWith(meta: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$SubPaginationModelImplCopyWith<$Res>
implements $SubPaginationModelCopyWith<$Res> {
factory _$$SubPaginationModelImplCopyWith(_$SubPaginationModelImpl value,
$Res Function(_$SubPaginationModelImpl) then) =
__$$SubPaginationModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({List<SubModel> data, Links links, Meta meta});
@override
$LinksCopyWith<$Res> get links;
@override
$MetaCopyWith<$Res> get meta;
}
/// @nodoc
class __$$SubPaginationModelImplCopyWithImpl<$Res>
extends _$SubPaginationModelCopyWithImpl<$Res, _$SubPaginationModelImpl>
implements _$$SubPaginationModelImplCopyWith<$Res> {
__$$SubPaginationModelImplCopyWithImpl(_$SubPaginationModelImpl _value,
$Res Function(_$SubPaginationModelImpl) _then)
: super(_value, _then);
/// Create a copy of SubPaginationModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? data = null,
Object? links = null,
Object? meta = null,
}) {
return _then(_$SubPaginationModelImpl(
data: null == data
? _value._data
: data // ignore: cast_nullable_to_non_nullable
as List<SubModel>,
links: null == links
? _value.links
: links // ignore: cast_nullable_to_non_nullable
as Links,
meta: null == meta
? _value.meta
: meta // ignore: cast_nullable_to_non_nullable
as Meta,
));
}
}
/// @nodoc
@JsonSerializable()
class _$SubPaginationModelImpl implements _SubPaginationModel {
const _$SubPaginationModelImpl(
{required final List<SubModel> data,
required this.links,
required this.meta})
: _data = data;
factory _$SubPaginationModelImpl.fromJson(Map<String, dynamic> json) =>
_$$SubPaginationModelImplFromJson(json);
final List<SubModel> _data;
@override
List<SubModel> get data {
if (_data is EqualUnmodifiableListView) return _data;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_data);
}
@override
final Links links;
@override
final Meta meta;
@override
String toString() {
return 'SubPaginationModel(data: $data, links: $links, meta: $meta)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$SubPaginationModelImpl &&
const DeepCollectionEquality().equals(other._data, _data) &&
(identical(other.links, links) || other.links == links) &&
(identical(other.meta, meta) || other.meta == meta));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
/// Create a copy of SubPaginationModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$SubPaginationModelImplCopyWith<_$SubPaginationModelImpl> get copyWith =>
__$$SubPaginationModelImplCopyWithImpl<_$SubPaginationModelImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$SubPaginationModelImplToJson(
this,
);
}
}
abstract class _SubPaginationModel implements SubPaginationModel {
const factory _SubPaginationModel(
{required final List<SubModel> data,
required final Links links,
required final Meta meta}) = _$SubPaginationModelImpl;
factory _SubPaginationModel.fromJson(Map<String, dynamic> json) =
_$SubPaginationModelImpl.fromJson;
@override
List<SubModel> get data;
@override
Links get links;
@override
Meta get meta;
/// Create a copy of SubPaginationModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$SubPaginationModelImplCopyWith<_$SubPaginationModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
SubModel _$SubModelFromJson(Map<String, dynamic> json) {
return _SubModel.fromJson(json);
}
/// @nodoc
mixin _$SubModel {
int get id => throw _privateConstructorUsedError;
String get slug => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
String get city => throw _privateConstructorUsedError;
DateTime get birthdate => throw _privateConstructorUsedError;
@JsonKey(name: 'is_entity_subscribed_by_me')
bool get isEntitySubscribedByMe => throw _privateConstructorUsedError;
String get email => throw _privateConstructorUsedError;
@JsonKey(name: 'profile_photo_url')
String get profilePhotoUrl => throw _privateConstructorUsedError;
String get role => throw _privateConstructorUsedError;
@JsonKey(name: 'is_public_profile')
bool get isPublicProfile => throw _privateConstructorUsedError;
@JsonKey(name: 'created_at')
DateTime get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: 'updated_at')
DateTime get updatedAt => throw _privateConstructorUsedError;
/// Serializes this SubModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SubModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$SubModelCopyWith<SubModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $SubModelCopyWith<$Res> {
factory $SubModelCopyWith(SubModel value, $Res Function(SubModel) then) =
_$SubModelCopyWithImpl<$Res, SubModel>;
@useResult
$Res call(
{int id,
String slug,
String name,
String city,
DateTime birthdate,
@JsonKey(name: 'is_entity_subscribed_by_me') bool isEntitySubscribedByMe,
String email,
@JsonKey(name: 'profile_photo_url') String profilePhotoUrl,
String role,
@JsonKey(name: 'is_public_profile') bool isPublicProfile,
@JsonKey(name: 'created_at') DateTime createdAt,
@JsonKey(name: 'updated_at') DateTime updatedAt});
}
/// @nodoc
class _$SubModelCopyWithImpl<$Res, $Val extends SubModel>
implements $SubModelCopyWith<$Res> {
_$SubModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SubModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? slug = null,
Object? name = null,
Object? city = null,
Object? birthdate = null,
Object? isEntitySubscribedByMe = null,
Object? email = null,
Object? profilePhotoUrl = null,
Object? role = null,
Object? isPublicProfile = null,
Object? createdAt = null,
Object? updatedAt = null,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
slug: null == slug
? _value.slug
: slug // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
city: null == city
? _value.city
: city // ignore: cast_nullable_to_non_nullable
as String,
birthdate: null == birthdate
? _value.birthdate
: birthdate // ignore: cast_nullable_to_non_nullable
as DateTime,
isEntitySubscribedByMe: null == isEntitySubscribedByMe
? _value.isEntitySubscribedByMe
: isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable
as bool,
email: null == email
? _value.email
: email // ignore: cast_nullable_to_non_nullable
as String,
profilePhotoUrl: null == profilePhotoUrl
? _value.profilePhotoUrl
: profilePhotoUrl // ignore: cast_nullable_to_non_nullable
as String,
role: null == role
? _value.role
: role // ignore: cast_nullable_to_non_nullable
as String,
isPublicProfile: null == isPublicProfile
? _value.isPublicProfile
: isPublicProfile // ignore: cast_nullable_to_non_nullable
as bool,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
) as $Val);
}
}
/// @nodoc
abstract class _$$SubModelImplCopyWith<$Res>
implements $SubModelCopyWith<$Res> {
factory _$$SubModelImplCopyWith(
_$SubModelImpl value, $Res Function(_$SubModelImpl) then) =
__$$SubModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
String slug,
String name,
String city,
DateTime birthdate,
@JsonKey(name: 'is_entity_subscribed_by_me') bool isEntitySubscribedByMe,
String email,
@JsonKey(name: 'profile_photo_url') String profilePhotoUrl,
String role,
@JsonKey(name: 'is_public_profile') bool isPublicProfile,
@JsonKey(name: 'created_at') DateTime createdAt,
@JsonKey(name: 'updated_at') DateTime updatedAt});
}
/// @nodoc
class __$$SubModelImplCopyWithImpl<$Res>
extends _$SubModelCopyWithImpl<$Res, _$SubModelImpl>
implements _$$SubModelImplCopyWith<$Res> {
__$$SubModelImplCopyWithImpl(
_$SubModelImpl _value, $Res Function(_$SubModelImpl) _then)
: super(_value, _then);
/// Create a copy of SubModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? slug = null,
Object? name = null,
Object? city = null,
Object? birthdate = null,
Object? isEntitySubscribedByMe = null,
Object? email = null,
Object? profilePhotoUrl = null,
Object? role = null,
Object? isPublicProfile = null,
Object? createdAt = null,
Object? updatedAt = null,
}) {
return _then(_$SubModelImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
slug: null == slug
? _value.slug
: slug // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
city: null == city
? _value.city
: city // ignore: cast_nullable_to_non_nullable
as String,
birthdate: null == birthdate
? _value.birthdate
: birthdate // ignore: cast_nullable_to_non_nullable
as DateTime,
isEntitySubscribedByMe: null == isEntitySubscribedByMe
? _value.isEntitySubscribedByMe
: isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable
as bool,
email: null == email
? _value.email
: email // ignore: cast_nullable_to_non_nullable
as String,
profilePhotoUrl: null == profilePhotoUrl
? _value.profilePhotoUrl
: profilePhotoUrl // ignore: cast_nullable_to_non_nullable
as String,
role: null == role
? _value.role
: role // ignore: cast_nullable_to_non_nullable
as String,
isPublicProfile: null == isPublicProfile
? _value.isPublicProfile
: isPublicProfile // ignore: cast_nullable_to_non_nullable
as bool,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
));
}
}
/// @nodoc
@JsonSerializable()
class _$SubModelImpl implements _SubModel {
const _$SubModelImpl(
{required this.id,
required this.slug,
required this.name,
required this.city,
required this.birthdate,
@JsonKey(name: 'is_entity_subscribed_by_me')
required this.isEntitySubscribedByMe,
required this.email,
@JsonKey(name: 'profile_photo_url') required this.profilePhotoUrl,
required this.role,
@JsonKey(name: 'is_public_profile') required this.isPublicProfile,
@JsonKey(name: 'created_at') required this.createdAt,
@JsonKey(name: 'updated_at') required this.updatedAt});
factory _$SubModelImpl.fromJson(Map<String, dynamic> json) =>
_$$SubModelImplFromJson(json);
@override
final int id;
@override
final String slug;
@override
final String name;
@override
final String city;
@override
final DateTime birthdate;
@override
@JsonKey(name: 'is_entity_subscribed_by_me')
final bool isEntitySubscribedByMe;
@override
final String email;
@override
@JsonKey(name: 'profile_photo_url')
final String profilePhotoUrl;
@override
final String role;
@override
@JsonKey(name: 'is_public_profile')
final bool isPublicProfile;
@override
@JsonKey(name: 'created_at')
final DateTime createdAt;
@override
@JsonKey(name: 'updated_at')
final DateTime updatedAt;
@override
String toString() {
return 'SubModel(id: $id, slug: $slug, name: $name, city: $city, birthdate: $birthdate, isEntitySubscribedByMe: $isEntitySubscribedByMe, email: $email, profilePhotoUrl: $profilePhotoUrl, role: $role, isPublicProfile: $isPublicProfile, createdAt: $createdAt, updatedAt: $updatedAt)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$SubModelImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.slug, slug) || other.slug == slug) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.city, city) || other.city == city) &&
(identical(other.birthdate, birthdate) ||
other.birthdate == birthdate) &&
(identical(other.isEntitySubscribedByMe, isEntitySubscribedByMe) ||
other.isEntitySubscribedByMe == isEntitySubscribedByMe) &&
(identical(other.email, email) || other.email == email) &&
(identical(other.profilePhotoUrl, profilePhotoUrl) ||
other.profilePhotoUrl == profilePhotoUrl) &&
(identical(other.role, role) || other.role == role) &&
(identical(other.isPublicProfile, isPublicProfile) ||
other.isPublicProfile == isPublicProfile) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
slug,
name,
city,
birthdate,
isEntitySubscribedByMe,
email,
profilePhotoUrl,
role,
isPublicProfile,
createdAt,
updatedAt);
/// Create a copy of SubModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$SubModelImplCopyWith<_$SubModelImpl> get copyWith =>
__$$SubModelImplCopyWithImpl<_$SubModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$SubModelImplToJson(
this,
);
}
}
abstract class _SubModel implements SubModel {
const factory _SubModel(
{required final int id,
required final String slug,
required final String name,
required final String city,
required final DateTime birthdate,
@JsonKey(name: 'is_entity_subscribed_by_me')
required final bool isEntitySubscribedByMe,
required final String email,
@JsonKey(name: 'profile_photo_url') required final String profilePhotoUrl,
required final String role,
@JsonKey(name: 'is_public_profile') required final bool isPublicProfile,
@JsonKey(name: 'created_at') required final DateTime createdAt,
@JsonKey(name: 'updated_at')
required final DateTime updatedAt}) = _$SubModelImpl;
factory _SubModel.fromJson(Map<String, dynamic> json) =
_$SubModelImpl.fromJson;
@override
int get id;
@override
String get slug;
@override
String get name;
@override
String get city;
@override
DateTime get birthdate;
@override
@JsonKey(name: 'is_entity_subscribed_by_me')
bool get isEntitySubscribedByMe;
@override
String get email;
@override
@JsonKey(name: 'profile_photo_url')
String get profilePhotoUrl;
@override
String get role;
@override
@JsonKey(name: 'is_public_profile')
bool get isPublicProfile;
@override
@JsonKey(name: 'created_at')
DateTime get createdAt;
@override
@JsonKey(name: 'updated_at')
DateTime get updatedAt;
/// Create a copy of SubModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$SubModelImplCopyWith<_$SubModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@@ -1,57 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'sub_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_$SubPaginationModelImpl _$$SubPaginationModelImplFromJson(
Map<String, dynamic> json) =>
_$SubPaginationModelImpl(
data: (json['data'] as List<dynamic>)
.map((e) => SubModel.fromJson(e as Map<String, dynamic>))
.toList(),
links: Links.fromJson(json['links'] as Map<String, dynamic>),
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$SubPaginationModelImplToJson(
_$SubPaginationModelImpl instance) =>
<String, dynamic>{
'data': instance.data,
'links': instance.links,
'meta': instance.meta,
};
_$SubModelImpl _$$SubModelImplFromJson(Map<String, dynamic> json) =>
_$SubModelImpl(
id: (json['id'] as num).toInt(),
slug: json['slug'] as String,
name: json['name'] as String,
city: json['city'] as String,
birthdate: DateTime.parse(json['birthdate'] as String),
isEntitySubscribedByMe: json['is_entity_subscribed_by_me'] as bool,
email: json['email'] as String,
profilePhotoUrl: json['profile_photo_url'] as String,
role: json['role'] as String,
isPublicProfile: json['is_public_profile'] as bool,
createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String),
);
Map<String, dynamic> _$$SubModelImplToJson(_$SubModelImpl instance) =>
<String, dynamic>{
'id': instance.id,
'slug': instance.slug,
'name': instance.name,
'city': instance.city,
'birthdate': instance.birthdate.toIso8601String(),
'is_entity_subscribed_by_me': instance.isEntitySubscribedByMe,
'email': instance.email,
'profile_photo_url': instance.profilePhotoUrl,
'role': instance.role,
'is_public_profile': instance.isPublicProfile,
'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(),
};

View File

@@ -1,289 +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 'weight_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');
WeightModel _$WeightModelFromJson(Map<String, dynamic> json) {
return _WeightModel.fromJson(json);
}
/// @nodoc
mixin _$WeightModel {
@JsonKey(name: "id")
int get id => throw _privateConstructorUsedError;
@JsonKey(name: "user_id")
int get userId => throw _privateConstructorUsedError;
@JsonKey(name: "weight")
int get weight => throw _privateConstructorUsedError;
@JsonKey(name: "created_at")
DateTime get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at")
DateTime get updatedAt => throw _privateConstructorUsedError;
@JsonKey(name: "bmi")
double get bmi => throw _privateConstructorUsedError;
/// Serializes this WeightModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of WeightModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$WeightModelCopyWith<WeightModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $WeightModelCopyWith<$Res> {
factory $WeightModelCopyWith(
WeightModel value, $Res Function(WeightModel) then) =
_$WeightModelCopyWithImpl<$Res, WeightModel>;
@useResult
$Res call(
{@JsonKey(name: "id") int id,
@JsonKey(name: "user_id") int userId,
@JsonKey(name: "weight") int weight,
@JsonKey(name: "created_at") DateTime createdAt,
@JsonKey(name: "updated_at") DateTime updatedAt,
@JsonKey(name: "bmi") double bmi});
}
/// @nodoc
class _$WeightModelCopyWithImpl<$Res, $Val extends WeightModel>
implements $WeightModelCopyWith<$Res> {
_$WeightModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of WeightModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? userId = null,
Object? weight = null,
Object? createdAt = null,
Object? updatedAt = null,
Object? bmi = null,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
userId: null == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as int,
weight: null == weight
? _value.weight
: weight // ignore: cast_nullable_to_non_nullable
as int,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
bmi: null == bmi
? _value.bmi
: bmi // ignore: cast_nullable_to_non_nullable
as double,
) as $Val);
}
}
/// @nodoc
abstract class _$$WeightModelImplCopyWith<$Res>
implements $WeightModelCopyWith<$Res> {
factory _$$WeightModelImplCopyWith(
_$WeightModelImpl value, $Res Function(_$WeightModelImpl) then) =
__$$WeightModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: "id") int id,
@JsonKey(name: "user_id") int userId,
@JsonKey(name: "weight") int weight,
@JsonKey(name: "created_at") DateTime createdAt,
@JsonKey(name: "updated_at") DateTime updatedAt,
@JsonKey(name: "bmi") double bmi});
}
/// @nodoc
class __$$WeightModelImplCopyWithImpl<$Res>
extends _$WeightModelCopyWithImpl<$Res, _$WeightModelImpl>
implements _$$WeightModelImplCopyWith<$Res> {
__$$WeightModelImplCopyWithImpl(
_$WeightModelImpl _value, $Res Function(_$WeightModelImpl) _then)
: super(_value, _then);
/// Create a copy of WeightModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? userId = null,
Object? weight = null,
Object? createdAt = null,
Object? updatedAt = null,
Object? bmi = null,
}) {
return _then(_$WeightModelImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
userId: null == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as int,
weight: null == weight
? _value.weight
: weight // ignore: cast_nullable_to_non_nullable
as int,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
bmi: null == bmi
? _value.bmi
: bmi // ignore: cast_nullable_to_non_nullable
as double,
));
}
}
/// @nodoc
@JsonSerializable()
class _$WeightModelImpl implements _WeightModel {
const _$WeightModelImpl(
{@JsonKey(name: "id") required this.id,
@JsonKey(name: "user_id") required this.userId,
@JsonKey(name: "weight") required this.weight,
@JsonKey(name: "created_at") required this.createdAt,
@JsonKey(name: "updated_at") required this.updatedAt,
@JsonKey(name: "bmi") required this.bmi});
factory _$WeightModelImpl.fromJson(Map<String, dynamic> json) =>
_$$WeightModelImplFromJson(json);
@override
@JsonKey(name: "id")
final int id;
@override
@JsonKey(name: "user_id")
final int userId;
@override
@JsonKey(name: "weight")
final int weight;
@override
@JsonKey(name: "created_at")
final DateTime createdAt;
@override
@JsonKey(name: "updated_at")
final DateTime updatedAt;
@override
@JsonKey(name: "bmi")
final double bmi;
@override
String toString() {
return 'WeightModel(id: $id, userId: $userId, weight: $weight, createdAt: $createdAt, updatedAt: $updatedAt, bmi: $bmi)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$WeightModelImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.userId, userId) || other.userId == userId) &&
(identical(other.weight, weight) || other.weight == weight) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.bmi, bmi) || other.bmi == bmi));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
Object.hash(runtimeType, id, userId, weight, createdAt, updatedAt, bmi);
/// Create a copy of WeightModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$WeightModelImplCopyWith<_$WeightModelImpl> get copyWith =>
__$$WeightModelImplCopyWithImpl<_$WeightModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$WeightModelImplToJson(
this,
);
}
}
abstract class _WeightModel implements WeightModel {
const factory _WeightModel(
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "user_id") required final int userId,
@JsonKey(name: "weight") required final int weight,
@JsonKey(name: "created_at") required final DateTime createdAt,
@JsonKey(name: "updated_at") required final DateTime updatedAt,
@JsonKey(name: "bmi") required final double bmi}) = _$WeightModelImpl;
factory _WeightModel.fromJson(Map<String, dynamic> json) =
_$WeightModelImpl.fromJson;
@override
@JsonKey(name: "id")
int get id;
@override
@JsonKey(name: "user_id")
int get userId;
@override
@JsonKey(name: "weight")
int get weight;
@override
@JsonKey(name: "created_at")
DateTime get createdAt;
@override
@JsonKey(name: "updated_at")
DateTime get updatedAt;
@override
@JsonKey(name: "bmi")
double get bmi;
/// Create a copy of WeightModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$WeightModelImplCopyWith<_$WeightModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@@ -1,27 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'weight_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_$WeightModelImpl _$$WeightModelImplFromJson(Map<String, dynamic> json) =>
_$WeightModelImpl(
id: (json['id'] as num).toInt(),
userId: (json['user_id'] as num).toInt(),
weight: (json['weight'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String),
bmi: (json['bmi'] as num).toDouble(),
);
Map<String, dynamic> _$$WeightModelImplToJson(_$WeightModelImpl instance) =>
<String, dynamic>{
'id': instance.id,
'user_id': instance.userId,
'weight': instance.weight,
'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(),
'bmi': instance.bmi,
};