Files
MWClash/lib/models/generated/navigation.freezed.dart

272 lines
8.5 KiB
Dart
Raw Normal View History

2024-04-30 23:38:49 +08:00
// 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 '../navigation.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 _$NavigationItem {
Icon get icon => throw _privateConstructorUsedError;
String get label => throw _privateConstructorUsedError;
String? get description => throw _privateConstructorUsedError;
Widget get fragment => throw _privateConstructorUsedError;
bool get keep => throw _privateConstructorUsedError;
2024-04-30 23:38:49 +08:00
String? get path => throw _privateConstructorUsedError;
List<NavigationItemMode> get modes => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$NavigationItemCopyWith<NavigationItem> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $NavigationItemCopyWith<$Res> {
factory $NavigationItemCopyWith(
NavigationItem value, $Res Function(NavigationItem) then) =
_$NavigationItemCopyWithImpl<$Res, NavigationItem>;
@useResult
$Res call(
{Icon icon,
String label,
String? description,
Widget fragment,
bool keep,
2024-04-30 23:38:49 +08:00
String? path,
List<NavigationItemMode> modes});
}
/// @nodoc
class _$NavigationItemCopyWithImpl<$Res, $Val extends NavigationItem>
implements $NavigationItemCopyWith<$Res> {
_$NavigationItemCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? icon = null,
Object? label = null,
Object? description = freezed,
Object? fragment = null,
Object? keep = null,
2024-04-30 23:38:49 +08:00
Object? path = freezed,
Object? modes = null,
}) {
return _then(_value.copyWith(
icon: null == icon
? _value.icon
: icon // ignore: cast_nullable_to_non_nullable
as Icon,
label: null == label
? _value.label
: label // ignore: cast_nullable_to_non_nullable
as String,
description: freezed == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String?,
fragment: null == fragment
? _value.fragment
: fragment // ignore: cast_nullable_to_non_nullable
as Widget,
keep: null == keep
? _value.keep
: keep // ignore: cast_nullable_to_non_nullable
as bool,
2024-04-30 23:38:49 +08:00
path: freezed == path
? _value.path
: path // ignore: cast_nullable_to_non_nullable
as String?,
modes: null == modes
? _value.modes
: modes // ignore: cast_nullable_to_non_nullable
as List<NavigationItemMode>,
) as $Val);
}
}
/// @nodoc
abstract class _$$NavigationItemImplCopyWith<$Res>
implements $NavigationItemCopyWith<$Res> {
factory _$$NavigationItemImplCopyWith(_$NavigationItemImpl value,
$Res Function(_$NavigationItemImpl) then) =
__$$NavigationItemImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{Icon icon,
String label,
String? description,
Widget fragment,
bool keep,
2024-04-30 23:38:49 +08:00
String? path,
List<NavigationItemMode> modes});
}
/// @nodoc
class __$$NavigationItemImplCopyWithImpl<$Res>
extends _$NavigationItemCopyWithImpl<$Res, _$NavigationItemImpl>
implements _$$NavigationItemImplCopyWith<$Res> {
__$$NavigationItemImplCopyWithImpl(
_$NavigationItemImpl _value, $Res Function(_$NavigationItemImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? icon = null,
Object? label = null,
Object? description = freezed,
Object? fragment = null,
Object? keep = null,
2024-04-30 23:38:49 +08:00
Object? path = freezed,
Object? modes = null,
}) {
return _then(_$NavigationItemImpl(
icon: null == icon
? _value.icon
: icon // ignore: cast_nullable_to_non_nullable
as Icon,
label: null == label
? _value.label
: label // ignore: cast_nullable_to_non_nullable
as String,
description: freezed == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String?,
fragment: null == fragment
? _value.fragment
: fragment // ignore: cast_nullable_to_non_nullable
as Widget,
keep: null == keep
? _value.keep
: keep // ignore: cast_nullable_to_non_nullable
as bool,
2024-04-30 23:38:49 +08:00
path: freezed == path
? _value.path
: path // ignore: cast_nullable_to_non_nullable
as String?,
modes: null == modes
? _value._modes
: modes // ignore: cast_nullable_to_non_nullable
as List<NavigationItemMode>,
));
}
}
/// @nodoc
class _$NavigationItemImpl implements _NavigationItem {
const _$NavigationItemImpl(
{required this.icon,
required this.label,
this.description,
required this.fragment,
this.keep = true,
2024-04-30 23:38:49 +08:00
this.path,
final List<NavigationItemMode> modes = const [
NavigationItemMode.mobile,
NavigationItemMode.desktop
]})
: _modes = modes;
@override
final Icon icon;
@override
final String label;
@override
final String? description;
@override
final Widget fragment;
@override
@JsonKey()
final bool keep;
@override
2024-04-30 23:38:49 +08:00
final String? path;
final List<NavigationItemMode> _modes;
@override
@JsonKey()
List<NavigationItemMode> get modes {
if (_modes is EqualUnmodifiableListView) return _modes;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_modes);
}
@override
String toString() {
return 'NavigationItem(icon: $icon, label: $label, description: $description, fragment: $fragment, keep: $keep, path: $path, modes: $modes)';
2024-04-30 23:38:49 +08:00
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$NavigationItemImpl &&
(identical(other.icon, icon) || other.icon == icon) &&
(identical(other.label, label) || other.label == label) &&
(identical(other.description, description) ||
other.description == description) &&
(identical(other.fragment, fragment) ||
other.fragment == fragment) &&
(identical(other.keep, keep) || other.keep == keep) &&
2024-04-30 23:38:49 +08:00
(identical(other.path, path) || other.path == path) &&
const DeepCollectionEquality().equals(other._modes, _modes));
}
@override
int get hashCode => Object.hash(runtimeType, icon, label, description,
fragment, keep, path, const DeepCollectionEquality().hash(_modes));
2024-04-30 23:38:49 +08:00
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$NavigationItemImplCopyWith<_$NavigationItemImpl> get copyWith =>
__$$NavigationItemImplCopyWithImpl<_$NavigationItemImpl>(
this, _$identity);
}
abstract class _NavigationItem implements NavigationItem {
const factory _NavigationItem(
{required final Icon icon,
required final String label,
final String? description,
required final Widget fragment,
final bool keep,
2024-04-30 23:38:49 +08:00
final String? path,
final List<NavigationItemMode> modes}) = _$NavigationItemImpl;
@override
Icon get icon;
@override
String get label;
@override
String? get description;
@override
Widget get fragment;
@override
bool get keep;
@override
2024-04-30 23:38:49 +08:00
String? get path;
@override
List<NavigationItemMode> get modes;
@override
@JsonKey(ignore: true)
_$$NavigationItemImplCopyWith<_$NavigationItemImpl> get copyWith =>
throw _privateConstructorUsedError;
}