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