Initial commit
This commit is contained in:
201
lib/domain/entities/training_plan.freezed.dart
Normal file
201
lib/domain/entities/training_plan.freezed.dart
Normal file
@@ -0,0 +1,201 @@
|
||||
// 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 'training_plan.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',
|
||||
);
|
||||
|
||||
/// @nodoc
|
||||
mixin _$TrainingPlanEntity {
|
||||
String get id => throw _privateConstructorUsedError;
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
List<TrainingSectionEntity> get sections =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of TrainingPlanEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$TrainingPlanEntityCopyWith<TrainingPlanEntity> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $TrainingPlanEntityCopyWith<$Res> {
|
||||
factory $TrainingPlanEntityCopyWith(
|
||||
TrainingPlanEntity value,
|
||||
$Res Function(TrainingPlanEntity) then,
|
||||
) = _$TrainingPlanEntityCopyWithImpl<$Res, TrainingPlanEntity>;
|
||||
@useResult
|
||||
$Res call({String id, String name, List<TrainingSectionEntity> sections});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$TrainingPlanEntityCopyWithImpl<$Res, $Val extends TrainingPlanEntity>
|
||||
implements $TrainingPlanEntityCopyWith<$Res> {
|
||||
_$TrainingPlanEntityCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of TrainingPlanEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({Object? id = null, Object? name = null, Object? sections = null}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
sections: null == sections
|
||||
? _value.sections
|
||||
: sections // ignore: cast_nullable_to_non_nullable
|
||||
as List<TrainingSectionEntity>,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$TrainingPlanEntityImplCopyWith<$Res>
|
||||
implements $TrainingPlanEntityCopyWith<$Res> {
|
||||
factory _$$TrainingPlanEntityImplCopyWith(
|
||||
_$TrainingPlanEntityImpl value,
|
||||
$Res Function(_$TrainingPlanEntityImpl) then,
|
||||
) = __$$TrainingPlanEntityImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String id, String name, List<TrainingSectionEntity> sections});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$TrainingPlanEntityImplCopyWithImpl<$Res>
|
||||
extends _$TrainingPlanEntityCopyWithImpl<$Res, _$TrainingPlanEntityImpl>
|
||||
implements _$$TrainingPlanEntityImplCopyWith<$Res> {
|
||||
__$$TrainingPlanEntityImplCopyWithImpl(
|
||||
_$TrainingPlanEntityImpl _value,
|
||||
$Res Function(_$TrainingPlanEntityImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of TrainingPlanEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({Object? id = null, Object? name = null, Object? sections = null}) {
|
||||
return _then(
|
||||
_$TrainingPlanEntityImpl(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
sections: null == sections
|
||||
? _value._sections
|
||||
: sections // ignore: cast_nullable_to_non_nullable
|
||||
as List<TrainingSectionEntity>,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$TrainingPlanEntityImpl extends _TrainingPlanEntity {
|
||||
const _$TrainingPlanEntityImpl({
|
||||
required this.id,
|
||||
required this.name,
|
||||
final List<TrainingSectionEntity> sections = const [],
|
||||
}) : _sections = sections,
|
||||
super._();
|
||||
|
||||
@override
|
||||
final String id;
|
||||
@override
|
||||
final String name;
|
||||
final List<TrainingSectionEntity> _sections;
|
||||
@override
|
||||
@JsonKey()
|
||||
List<TrainingSectionEntity> get sections {
|
||||
if (_sections is EqualUnmodifiableListView) return _sections;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_sections);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TrainingPlanEntity(id: $id, name: $name, sections: $sections)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$TrainingPlanEntityImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
const DeepCollectionEquality().equals(other._sections, _sections));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
name,
|
||||
const DeepCollectionEquality().hash(_sections),
|
||||
);
|
||||
|
||||
/// Create a copy of TrainingPlanEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$TrainingPlanEntityImplCopyWith<_$TrainingPlanEntityImpl> get copyWith =>
|
||||
__$$TrainingPlanEntityImplCopyWithImpl<_$TrainingPlanEntityImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
}
|
||||
|
||||
abstract class _TrainingPlanEntity extends TrainingPlanEntity {
|
||||
const factory _TrainingPlanEntity({
|
||||
required final String id,
|
||||
required final String name,
|
||||
final List<TrainingSectionEntity> sections,
|
||||
}) = _$TrainingPlanEntityImpl;
|
||||
const _TrainingPlanEntity._() : super._();
|
||||
|
||||
@override
|
||||
String get id;
|
||||
@override
|
||||
String get name;
|
||||
@override
|
||||
List<TrainingSectionEntity> get sections;
|
||||
|
||||
/// Create a copy of TrainingPlanEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$TrainingPlanEntityImplCopyWith<_$TrainingPlanEntityImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
Reference in New Issue
Block a user