Files
trainhub-flutter/lib/presentation/plan_editor/plan_editor_state.freezed.dart
Kazimierz Ciołek 782986a632 Initial commit
2026-02-19 02:49:29 +01:00

236 lines
7.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 'plan_editor_state.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 _$PlanEditorState {
TrainingPlanEntity get plan => throw _privateConstructorUsedError;
bool get isDirty => throw _privateConstructorUsedError;
List<ExerciseEntity> get availableExercises =>
throw _privateConstructorUsedError;
/// Create a copy of PlanEditorState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PlanEditorStateCopyWith<PlanEditorState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PlanEditorStateCopyWith<$Res> {
factory $PlanEditorStateCopyWith(
PlanEditorState value,
$Res Function(PlanEditorState) then,
) = _$PlanEditorStateCopyWithImpl<$Res, PlanEditorState>;
@useResult
$Res call({
TrainingPlanEntity plan,
bool isDirty,
List<ExerciseEntity> availableExercises,
});
$TrainingPlanEntityCopyWith<$Res> get plan;
}
/// @nodoc
class _$PlanEditorStateCopyWithImpl<$Res, $Val extends PlanEditorState>
implements $PlanEditorStateCopyWith<$Res> {
_$PlanEditorStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of PlanEditorState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? plan = null,
Object? isDirty = null,
Object? availableExercises = null,
}) {
return _then(
_value.copyWith(
plan: null == plan
? _value.plan
: plan // ignore: cast_nullable_to_non_nullable
as TrainingPlanEntity,
isDirty: null == isDirty
? _value.isDirty
: isDirty // ignore: cast_nullable_to_non_nullable
as bool,
availableExercises: null == availableExercises
? _value.availableExercises
: availableExercises // ignore: cast_nullable_to_non_nullable
as List<ExerciseEntity>,
)
as $Val,
);
}
/// Create a copy of PlanEditorState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$TrainingPlanEntityCopyWith<$Res> get plan {
return $TrainingPlanEntityCopyWith<$Res>(_value.plan, (value) {
return _then(_value.copyWith(plan: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$PlanEditorStateImplCopyWith<$Res>
implements $PlanEditorStateCopyWith<$Res> {
factory _$$PlanEditorStateImplCopyWith(
_$PlanEditorStateImpl value,
$Res Function(_$PlanEditorStateImpl) then,
) = __$$PlanEditorStateImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
TrainingPlanEntity plan,
bool isDirty,
List<ExerciseEntity> availableExercises,
});
@override
$TrainingPlanEntityCopyWith<$Res> get plan;
}
/// @nodoc
class __$$PlanEditorStateImplCopyWithImpl<$Res>
extends _$PlanEditorStateCopyWithImpl<$Res, _$PlanEditorStateImpl>
implements _$$PlanEditorStateImplCopyWith<$Res> {
__$$PlanEditorStateImplCopyWithImpl(
_$PlanEditorStateImpl _value,
$Res Function(_$PlanEditorStateImpl) _then,
) : super(_value, _then);
/// Create a copy of PlanEditorState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? plan = null,
Object? isDirty = null,
Object? availableExercises = null,
}) {
return _then(
_$PlanEditorStateImpl(
plan: null == plan
? _value.plan
: plan // ignore: cast_nullable_to_non_nullable
as TrainingPlanEntity,
isDirty: null == isDirty
? _value.isDirty
: isDirty // ignore: cast_nullable_to_non_nullable
as bool,
availableExercises: null == availableExercises
? _value._availableExercises
: availableExercises // ignore: cast_nullable_to_non_nullable
as List<ExerciseEntity>,
),
);
}
}
/// @nodoc
class _$PlanEditorStateImpl implements _PlanEditorState {
const _$PlanEditorStateImpl({
required this.plan,
this.isDirty = false,
final List<ExerciseEntity> availableExercises = const [],
}) : _availableExercises = availableExercises;
@override
final TrainingPlanEntity plan;
@override
@JsonKey()
final bool isDirty;
final List<ExerciseEntity> _availableExercises;
@override
@JsonKey()
List<ExerciseEntity> get availableExercises {
if (_availableExercises is EqualUnmodifiableListView)
return _availableExercises;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_availableExercises);
}
@override
String toString() {
return 'PlanEditorState(plan: $plan, isDirty: $isDirty, availableExercises: $availableExercises)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$PlanEditorStateImpl &&
(identical(other.plan, plan) || other.plan == plan) &&
(identical(other.isDirty, isDirty) || other.isDirty == isDirty) &&
const DeepCollectionEquality().equals(
other._availableExercises,
_availableExercises,
));
}
@override
int get hashCode => Object.hash(
runtimeType,
plan,
isDirty,
const DeepCollectionEquality().hash(_availableExercises),
);
/// Create a copy of PlanEditorState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PlanEditorStateImplCopyWith<_$PlanEditorStateImpl> get copyWith =>
__$$PlanEditorStateImplCopyWithImpl<_$PlanEditorStateImpl>(
this,
_$identity,
);
}
abstract class _PlanEditorState implements PlanEditorState {
const factory _PlanEditorState({
required final TrainingPlanEntity plan,
final bool isDirty,
final List<ExerciseEntity> availableExercises,
}) = _$PlanEditorStateImpl;
@override
TrainingPlanEntity get plan;
@override
bool get isDirty;
@override
List<ExerciseEntity> get availableExercises;
/// Create a copy of PlanEditorState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PlanEditorStateImplCopyWith<_$PlanEditorStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}