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

330 lines
11 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 'calendar_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 _$CalendarState {
List<ProgramEntity> get programs => throw _privateConstructorUsedError;
ProgramEntity? get activeProgram => throw _privateConstructorUsedError;
List<ProgramWeekEntity> get weeks => throw _privateConstructorUsedError;
List<ProgramWorkoutEntity> get workouts => throw _privateConstructorUsedError;
List<TrainingPlanEntity> get plans => throw _privateConstructorUsedError;
List<ExerciseEntity> get exercises => throw _privateConstructorUsedError;
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$CalendarStateCopyWith<CalendarState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $CalendarStateCopyWith<$Res> {
factory $CalendarStateCopyWith(
CalendarState value,
$Res Function(CalendarState) then,
) = _$CalendarStateCopyWithImpl<$Res, CalendarState>;
@useResult
$Res call({
List<ProgramEntity> programs,
ProgramEntity? activeProgram,
List<ProgramWeekEntity> weeks,
List<ProgramWorkoutEntity> workouts,
List<TrainingPlanEntity> plans,
List<ExerciseEntity> exercises,
});
$ProgramEntityCopyWith<$Res>? get activeProgram;
}
/// @nodoc
class _$CalendarStateCopyWithImpl<$Res, $Val extends CalendarState>
implements $CalendarStateCopyWith<$Res> {
_$CalendarStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? programs = null,
Object? activeProgram = freezed,
Object? weeks = null,
Object? workouts = null,
Object? plans = null,
Object? exercises = null,
}) {
return _then(
_value.copyWith(
programs: null == programs
? _value.programs
: programs // ignore: cast_nullable_to_non_nullable
as List<ProgramEntity>,
activeProgram: freezed == activeProgram
? _value.activeProgram
: activeProgram // ignore: cast_nullable_to_non_nullable
as ProgramEntity?,
weeks: null == weeks
? _value.weeks
: weeks // ignore: cast_nullable_to_non_nullable
as List<ProgramWeekEntity>,
workouts: null == workouts
? _value.workouts
: workouts // ignore: cast_nullable_to_non_nullable
as List<ProgramWorkoutEntity>,
plans: null == plans
? _value.plans
: plans // ignore: cast_nullable_to_non_nullable
as List<TrainingPlanEntity>,
exercises: null == exercises
? _value.exercises
: exercises // ignore: cast_nullable_to_non_nullable
as List<ExerciseEntity>,
)
as $Val,
);
}
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ProgramEntityCopyWith<$Res>? get activeProgram {
if (_value.activeProgram == null) {
return null;
}
return $ProgramEntityCopyWith<$Res>(_value.activeProgram!, (value) {
return _then(_value.copyWith(activeProgram: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$CalendarStateImplCopyWith<$Res>
implements $CalendarStateCopyWith<$Res> {
factory _$$CalendarStateImplCopyWith(
_$CalendarStateImpl value,
$Res Function(_$CalendarStateImpl) then,
) = __$$CalendarStateImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
List<ProgramEntity> programs,
ProgramEntity? activeProgram,
List<ProgramWeekEntity> weeks,
List<ProgramWorkoutEntity> workouts,
List<TrainingPlanEntity> plans,
List<ExerciseEntity> exercises,
});
@override
$ProgramEntityCopyWith<$Res>? get activeProgram;
}
/// @nodoc
class __$$CalendarStateImplCopyWithImpl<$Res>
extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateImpl>
implements _$$CalendarStateImplCopyWith<$Res> {
__$$CalendarStateImplCopyWithImpl(
_$CalendarStateImpl _value,
$Res Function(_$CalendarStateImpl) _then,
) : super(_value, _then);
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? programs = null,
Object? activeProgram = freezed,
Object? weeks = null,
Object? workouts = null,
Object? plans = null,
Object? exercises = null,
}) {
return _then(
_$CalendarStateImpl(
programs: null == programs
? _value._programs
: programs // ignore: cast_nullable_to_non_nullable
as List<ProgramEntity>,
activeProgram: freezed == activeProgram
? _value.activeProgram
: activeProgram // ignore: cast_nullable_to_non_nullable
as ProgramEntity?,
weeks: null == weeks
? _value._weeks
: weeks // ignore: cast_nullable_to_non_nullable
as List<ProgramWeekEntity>,
workouts: null == workouts
? _value._workouts
: workouts // ignore: cast_nullable_to_non_nullable
as List<ProgramWorkoutEntity>,
plans: null == plans
? _value._plans
: plans // ignore: cast_nullable_to_non_nullable
as List<TrainingPlanEntity>,
exercises: null == exercises
? _value._exercises
: exercises // ignore: cast_nullable_to_non_nullable
as List<ExerciseEntity>,
),
);
}
}
/// @nodoc
class _$CalendarStateImpl implements _CalendarState {
const _$CalendarStateImpl({
final List<ProgramEntity> programs = const [],
this.activeProgram,
final List<ProgramWeekEntity> weeks = const [],
final List<ProgramWorkoutEntity> workouts = const [],
final List<TrainingPlanEntity> plans = const [],
final List<ExerciseEntity> exercises = const [],
}) : _programs = programs,
_weeks = weeks,
_workouts = workouts,
_plans = plans,
_exercises = exercises;
final List<ProgramEntity> _programs;
@override
@JsonKey()
List<ProgramEntity> get programs {
if (_programs is EqualUnmodifiableListView) return _programs;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_programs);
}
@override
final ProgramEntity? activeProgram;
final List<ProgramWeekEntity> _weeks;
@override
@JsonKey()
List<ProgramWeekEntity> get weeks {
if (_weeks is EqualUnmodifiableListView) return _weeks;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_weeks);
}
final List<ProgramWorkoutEntity> _workouts;
@override
@JsonKey()
List<ProgramWorkoutEntity> get workouts {
if (_workouts is EqualUnmodifiableListView) return _workouts;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_workouts);
}
final List<TrainingPlanEntity> _plans;
@override
@JsonKey()
List<TrainingPlanEntity> get plans {
if (_plans is EqualUnmodifiableListView) return _plans;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_plans);
}
final List<ExerciseEntity> _exercises;
@override
@JsonKey()
List<ExerciseEntity> get exercises {
if (_exercises is EqualUnmodifiableListView) return _exercises;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_exercises);
}
@override
String toString() {
return 'CalendarState(programs: $programs, activeProgram: $activeProgram, weeks: $weeks, workouts: $workouts, plans: $plans, exercises: $exercises)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CalendarStateImpl &&
const DeepCollectionEquality().equals(other._programs, _programs) &&
(identical(other.activeProgram, activeProgram) ||
other.activeProgram == activeProgram) &&
const DeepCollectionEquality().equals(other._weeks, _weeks) &&
const DeepCollectionEquality().equals(other._workouts, _workouts) &&
const DeepCollectionEquality().equals(other._plans, _plans) &&
const DeepCollectionEquality().equals(
other._exercises,
_exercises,
));
}
@override
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(_programs),
activeProgram,
const DeepCollectionEquality().hash(_weeks),
const DeepCollectionEquality().hash(_workouts),
const DeepCollectionEquality().hash(_plans),
const DeepCollectionEquality().hash(_exercises),
);
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$CalendarStateImplCopyWith<_$CalendarStateImpl> get copyWith =>
__$$CalendarStateImplCopyWithImpl<_$CalendarStateImpl>(this, _$identity);
}
abstract class _CalendarState implements CalendarState {
const factory _CalendarState({
final List<ProgramEntity> programs,
final ProgramEntity? activeProgram,
final List<ProgramWeekEntity> weeks,
final List<ProgramWorkoutEntity> workouts,
final List<TrainingPlanEntity> plans,
final List<ExerciseEntity> exercises,
}) = _$CalendarStateImpl;
@override
List<ProgramEntity> get programs;
@override
ProgramEntity? get activeProgram;
@override
List<ProgramWeekEntity> get weeks;
@override
List<ProgramWorkoutEntity> get workouts;
@override
List<TrainingPlanEntity> get plans;
@override
List<ExerciseEntity> get exercises;
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CalendarStateImplCopyWith<_$CalendarStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}