forked from eatvio/eatvio_app
290 lines
9.5 KiB
Dart
290 lines
9.5 KiB
Dart
// 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;
|
|
}
|