Initial commit
This commit is contained in:
261
lib/presentation/home/home_state.freezed.dart
Normal file
261
lib/presentation/home/home_state.freezed.dart
Normal file
@@ -0,0 +1,261 @@
|
||||
// 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 'home_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 _$HomeState {
|
||||
String? get activeProgramName => throw _privateConstructorUsedError;
|
||||
int get completedWorkouts => throw _privateConstructorUsedError;
|
||||
int get totalWorkouts => throw _privateConstructorUsedError;
|
||||
String? get nextWorkoutName => throw _privateConstructorUsedError;
|
||||
List<ProgramWorkoutEntity> get recentActivity =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of HomeState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$HomeStateCopyWith<HomeState> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $HomeStateCopyWith<$Res> {
|
||||
factory $HomeStateCopyWith(HomeState value, $Res Function(HomeState) then) =
|
||||
_$HomeStateCopyWithImpl<$Res, HomeState>;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? activeProgramName,
|
||||
int completedWorkouts,
|
||||
int totalWorkouts,
|
||||
String? nextWorkoutName,
|
||||
List<ProgramWorkoutEntity> recentActivity,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$HomeStateCopyWithImpl<$Res, $Val extends HomeState>
|
||||
implements $HomeStateCopyWith<$Res> {
|
||||
_$HomeStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of HomeState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? activeProgramName = freezed,
|
||||
Object? completedWorkouts = null,
|
||||
Object? totalWorkouts = null,
|
||||
Object? nextWorkoutName = freezed,
|
||||
Object? recentActivity = null,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
activeProgramName: freezed == activeProgramName
|
||||
? _value.activeProgramName
|
||||
: activeProgramName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
completedWorkouts: null == completedWorkouts
|
||||
? _value.completedWorkouts
|
||||
: completedWorkouts // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalWorkouts: null == totalWorkouts
|
||||
? _value.totalWorkouts
|
||||
: totalWorkouts // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
nextWorkoutName: freezed == nextWorkoutName
|
||||
? _value.nextWorkoutName
|
||||
: nextWorkoutName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
recentActivity: null == recentActivity
|
||||
? _value.recentActivity
|
||||
: recentActivity // ignore: cast_nullable_to_non_nullable
|
||||
as List<ProgramWorkoutEntity>,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$HomeStateImplCopyWith<$Res>
|
||||
implements $HomeStateCopyWith<$Res> {
|
||||
factory _$$HomeStateImplCopyWith(
|
||||
_$HomeStateImpl value,
|
||||
$Res Function(_$HomeStateImpl) then,
|
||||
) = __$$HomeStateImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
String? activeProgramName,
|
||||
int completedWorkouts,
|
||||
int totalWorkouts,
|
||||
String? nextWorkoutName,
|
||||
List<ProgramWorkoutEntity> recentActivity,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$HomeStateImplCopyWithImpl<$Res>
|
||||
extends _$HomeStateCopyWithImpl<$Res, _$HomeStateImpl>
|
||||
implements _$$HomeStateImplCopyWith<$Res> {
|
||||
__$$HomeStateImplCopyWithImpl(
|
||||
_$HomeStateImpl _value,
|
||||
$Res Function(_$HomeStateImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of HomeState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? activeProgramName = freezed,
|
||||
Object? completedWorkouts = null,
|
||||
Object? totalWorkouts = null,
|
||||
Object? nextWorkoutName = freezed,
|
||||
Object? recentActivity = null,
|
||||
}) {
|
||||
return _then(
|
||||
_$HomeStateImpl(
|
||||
activeProgramName: freezed == activeProgramName
|
||||
? _value.activeProgramName
|
||||
: activeProgramName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
completedWorkouts: null == completedWorkouts
|
||||
? _value.completedWorkouts
|
||||
: completedWorkouts // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalWorkouts: null == totalWorkouts
|
||||
? _value.totalWorkouts
|
||||
: totalWorkouts // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
nextWorkoutName: freezed == nextWorkoutName
|
||||
? _value.nextWorkoutName
|
||||
: nextWorkoutName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
recentActivity: null == recentActivity
|
||||
? _value._recentActivity
|
||||
: recentActivity // ignore: cast_nullable_to_non_nullable
|
||||
as List<ProgramWorkoutEntity>,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$HomeStateImpl implements _HomeState {
|
||||
const _$HomeStateImpl({
|
||||
this.activeProgramName,
|
||||
this.completedWorkouts = 0,
|
||||
this.totalWorkouts = 0,
|
||||
this.nextWorkoutName,
|
||||
final List<ProgramWorkoutEntity> recentActivity = const [],
|
||||
}) : _recentActivity = recentActivity;
|
||||
|
||||
@override
|
||||
final String? activeProgramName;
|
||||
@override
|
||||
@JsonKey()
|
||||
final int completedWorkouts;
|
||||
@override
|
||||
@JsonKey()
|
||||
final int totalWorkouts;
|
||||
@override
|
||||
final String? nextWorkoutName;
|
||||
final List<ProgramWorkoutEntity> _recentActivity;
|
||||
@override
|
||||
@JsonKey()
|
||||
List<ProgramWorkoutEntity> get recentActivity {
|
||||
if (_recentActivity is EqualUnmodifiableListView) return _recentActivity;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_recentActivity);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'HomeState(activeProgramName: $activeProgramName, completedWorkouts: $completedWorkouts, totalWorkouts: $totalWorkouts, nextWorkoutName: $nextWorkoutName, recentActivity: $recentActivity)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$HomeStateImpl &&
|
||||
(identical(other.activeProgramName, activeProgramName) ||
|
||||
other.activeProgramName == activeProgramName) &&
|
||||
(identical(other.completedWorkouts, completedWorkouts) ||
|
||||
other.completedWorkouts == completedWorkouts) &&
|
||||
(identical(other.totalWorkouts, totalWorkouts) ||
|
||||
other.totalWorkouts == totalWorkouts) &&
|
||||
(identical(other.nextWorkoutName, nextWorkoutName) ||
|
||||
other.nextWorkoutName == nextWorkoutName) &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._recentActivity,
|
||||
_recentActivity,
|
||||
));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
activeProgramName,
|
||||
completedWorkouts,
|
||||
totalWorkouts,
|
||||
nextWorkoutName,
|
||||
const DeepCollectionEquality().hash(_recentActivity),
|
||||
);
|
||||
|
||||
/// Create a copy of HomeState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$HomeStateImplCopyWith<_$HomeStateImpl> get copyWith =>
|
||||
__$$HomeStateImplCopyWithImpl<_$HomeStateImpl>(this, _$identity);
|
||||
}
|
||||
|
||||
abstract class _HomeState implements HomeState {
|
||||
const factory _HomeState({
|
||||
final String? activeProgramName,
|
||||
final int completedWorkouts,
|
||||
final int totalWorkouts,
|
||||
final String? nextWorkoutName,
|
||||
final List<ProgramWorkoutEntity> recentActivity,
|
||||
}) = _$HomeStateImpl;
|
||||
|
||||
@override
|
||||
String? get activeProgramName;
|
||||
@override
|
||||
int get completedWorkouts;
|
||||
@override
|
||||
int get totalWorkouts;
|
||||
@override
|
||||
String? get nextWorkoutName;
|
||||
@override
|
||||
List<ProgramWorkoutEntity> get recentActivity;
|
||||
|
||||
/// Create a copy of HomeState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$HomeStateImplCopyWith<_$HomeStateImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
Reference in New Issue
Block a user