veilidchat/lib/settings/models/preferences.freezed.dart
2025-03-22 21:43:37 -04:00

498 lines
17 KiB
Dart

// dart format width=80
// 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 'preferences.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$LockPreference {
int get inactivityLockSecs;
bool get lockWhenSwitching;
bool get lockWithSystemLock;
/// Create a copy of LockPreference
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$LockPreferenceCopyWith<LockPreference> get copyWith =>
_$LockPreferenceCopyWithImpl<LockPreference>(
this as LockPreference, _$identity);
/// Serializes this LockPreference to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is LockPreference &&
(identical(other.inactivityLockSecs, inactivityLockSecs) ||
other.inactivityLockSecs == inactivityLockSecs) &&
(identical(other.lockWhenSwitching, lockWhenSwitching) ||
other.lockWhenSwitching == lockWhenSwitching) &&
(identical(other.lockWithSystemLock, lockWithSystemLock) ||
other.lockWithSystemLock == lockWithSystemLock));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, inactivityLockSecs, lockWhenSwitching, lockWithSystemLock);
@override
String toString() {
return 'LockPreference(inactivityLockSecs: $inactivityLockSecs, lockWhenSwitching: $lockWhenSwitching, lockWithSystemLock: $lockWithSystemLock)';
}
}
/// @nodoc
abstract mixin class $LockPreferenceCopyWith<$Res> {
factory $LockPreferenceCopyWith(
LockPreference value, $Res Function(LockPreference) _then) =
_$LockPreferenceCopyWithImpl;
@useResult
$Res call(
{int inactivityLockSecs,
bool lockWhenSwitching,
bool lockWithSystemLock});
}
/// @nodoc
class _$LockPreferenceCopyWithImpl<$Res>
implements $LockPreferenceCopyWith<$Res> {
_$LockPreferenceCopyWithImpl(this._self, this._then);
final LockPreference _self;
final $Res Function(LockPreference) _then;
/// Create a copy of LockPreference
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? inactivityLockSecs = null,
Object? lockWhenSwitching = null,
Object? lockWithSystemLock = null,
}) {
return _then(_self.copyWith(
inactivityLockSecs: null == inactivityLockSecs
? _self.inactivityLockSecs
: inactivityLockSecs // ignore: cast_nullable_to_non_nullable
as int,
lockWhenSwitching: null == lockWhenSwitching
? _self.lockWhenSwitching
: lockWhenSwitching // ignore: cast_nullable_to_non_nullable
as bool,
lockWithSystemLock: null == lockWithSystemLock
? _self.lockWithSystemLock
: lockWithSystemLock // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// @nodoc
@JsonSerializable()
class _LockPreference implements LockPreference {
const _LockPreference(
{this.inactivityLockSecs = 0,
this.lockWhenSwitching = false,
this.lockWithSystemLock = false});
factory _LockPreference.fromJson(Map<String, dynamic> json) =>
_$LockPreferenceFromJson(json);
@override
@JsonKey()
final int inactivityLockSecs;
@override
@JsonKey()
final bool lockWhenSwitching;
@override
@JsonKey()
final bool lockWithSystemLock;
/// Create a copy of LockPreference
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$LockPreferenceCopyWith<_LockPreference> get copyWith =>
__$LockPreferenceCopyWithImpl<_LockPreference>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$LockPreferenceToJson(
this,
);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _LockPreference &&
(identical(other.inactivityLockSecs, inactivityLockSecs) ||
other.inactivityLockSecs == inactivityLockSecs) &&
(identical(other.lockWhenSwitching, lockWhenSwitching) ||
other.lockWhenSwitching == lockWhenSwitching) &&
(identical(other.lockWithSystemLock, lockWithSystemLock) ||
other.lockWithSystemLock == lockWithSystemLock));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, inactivityLockSecs, lockWhenSwitching, lockWithSystemLock);
@override
String toString() {
return 'LockPreference(inactivityLockSecs: $inactivityLockSecs, lockWhenSwitching: $lockWhenSwitching, lockWithSystemLock: $lockWithSystemLock)';
}
}
/// @nodoc
abstract mixin class _$LockPreferenceCopyWith<$Res>
implements $LockPreferenceCopyWith<$Res> {
factory _$LockPreferenceCopyWith(
_LockPreference value, $Res Function(_LockPreference) _then) =
__$LockPreferenceCopyWithImpl;
@override
@useResult
$Res call(
{int inactivityLockSecs,
bool lockWhenSwitching,
bool lockWithSystemLock});
}
/// @nodoc
class __$LockPreferenceCopyWithImpl<$Res>
implements _$LockPreferenceCopyWith<$Res> {
__$LockPreferenceCopyWithImpl(this._self, this._then);
final _LockPreference _self;
final $Res Function(_LockPreference) _then;
/// Create a copy of LockPreference
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$Res call({
Object? inactivityLockSecs = null,
Object? lockWhenSwitching = null,
Object? lockWithSystemLock = null,
}) {
return _then(_LockPreference(
inactivityLockSecs: null == inactivityLockSecs
? _self.inactivityLockSecs
: inactivityLockSecs // ignore: cast_nullable_to_non_nullable
as int,
lockWhenSwitching: null == lockWhenSwitching
? _self.lockWhenSwitching
: lockWhenSwitching // ignore: cast_nullable_to_non_nullable
as bool,
lockWithSystemLock: null == lockWithSystemLock
? _self.lockWithSystemLock
: lockWithSystemLock // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// @nodoc
mixin _$Preferences {
ThemePreferences get themePreference;
LanguagePreference get languagePreference;
LockPreference get lockPreference;
NotificationsPreference get notificationsPreference;
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$PreferencesCopyWith<Preferences> get copyWith =>
_$PreferencesCopyWithImpl<Preferences>(this as Preferences, _$identity);
/// Serializes this Preferences to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is Preferences &&
(identical(other.themePreference, themePreference) ||
other.themePreference == themePreference) &&
(identical(other.languagePreference, languagePreference) ||
other.languagePreference == languagePreference) &&
(identical(other.lockPreference, lockPreference) ||
other.lockPreference == lockPreference) &&
(identical(
other.notificationsPreference, notificationsPreference) ||
other.notificationsPreference == notificationsPreference));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, themePreference,
languagePreference, lockPreference, notificationsPreference);
@override
String toString() {
return 'Preferences(themePreference: $themePreference, languagePreference: $languagePreference, lockPreference: $lockPreference, notificationsPreference: $notificationsPreference)';
}
}
/// @nodoc
abstract mixin class $PreferencesCopyWith<$Res> {
factory $PreferencesCopyWith(
Preferences value, $Res Function(Preferences) _then) =
_$PreferencesCopyWithImpl;
@useResult
$Res call(
{ThemePreferences themePreference,
LanguagePreference languagePreference,
LockPreference lockPreference,
NotificationsPreference notificationsPreference});
$ThemePreferencesCopyWith<$Res> get themePreference;
$LockPreferenceCopyWith<$Res> get lockPreference;
$NotificationsPreferenceCopyWith<$Res> get notificationsPreference;
}
/// @nodoc
class _$PreferencesCopyWithImpl<$Res> implements $PreferencesCopyWith<$Res> {
_$PreferencesCopyWithImpl(this._self, this._then);
final Preferences _self;
final $Res Function(Preferences) _then;
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? themePreference = null,
Object? languagePreference = null,
Object? lockPreference = null,
Object? notificationsPreference = null,
}) {
return _then(_self.copyWith(
themePreference: null == themePreference
? _self.themePreference
: themePreference // ignore: cast_nullable_to_non_nullable
as ThemePreferences,
languagePreference: null == languagePreference
? _self.languagePreference
: languagePreference // ignore: cast_nullable_to_non_nullable
as LanguagePreference,
lockPreference: null == lockPreference
? _self.lockPreference
: lockPreference // ignore: cast_nullable_to_non_nullable
as LockPreference,
notificationsPreference: null == notificationsPreference
? _self.notificationsPreference
: notificationsPreference // ignore: cast_nullable_to_non_nullable
as NotificationsPreference,
));
}
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ThemePreferencesCopyWith<$Res> get themePreference {
return $ThemePreferencesCopyWith<$Res>(_self.themePreference, (value) {
return _then(_self.copyWith(themePreference: value));
});
}
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$LockPreferenceCopyWith<$Res> get lockPreference {
return $LockPreferenceCopyWith<$Res>(_self.lockPreference, (value) {
return _then(_self.copyWith(lockPreference: value));
});
}
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$NotificationsPreferenceCopyWith<$Res> get notificationsPreference {
return $NotificationsPreferenceCopyWith<$Res>(_self.notificationsPreference,
(value) {
return _then(_self.copyWith(notificationsPreference: value));
});
}
}
/// @nodoc
@JsonSerializable()
class _Preferences implements Preferences {
const _Preferences(
{this.themePreference = ThemePreferences.defaults,
this.languagePreference = LanguagePreference.defaults,
this.lockPreference = LockPreference.defaults,
this.notificationsPreference = NotificationsPreference.defaults});
factory _Preferences.fromJson(Map<String, dynamic> json) =>
_$PreferencesFromJson(json);
@override
@JsonKey()
final ThemePreferences themePreference;
@override
@JsonKey()
final LanguagePreference languagePreference;
@override
@JsonKey()
final LockPreference lockPreference;
@override
@JsonKey()
final NotificationsPreference notificationsPreference;
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$PreferencesCopyWith<_Preferences> get copyWith =>
__$PreferencesCopyWithImpl<_Preferences>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$PreferencesToJson(
this,
);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _Preferences &&
(identical(other.themePreference, themePreference) ||
other.themePreference == themePreference) &&
(identical(other.languagePreference, languagePreference) ||
other.languagePreference == languagePreference) &&
(identical(other.lockPreference, lockPreference) ||
other.lockPreference == lockPreference) &&
(identical(
other.notificationsPreference, notificationsPreference) ||
other.notificationsPreference == notificationsPreference));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, themePreference,
languagePreference, lockPreference, notificationsPreference);
@override
String toString() {
return 'Preferences(themePreference: $themePreference, languagePreference: $languagePreference, lockPreference: $lockPreference, notificationsPreference: $notificationsPreference)';
}
}
/// @nodoc
abstract mixin class _$PreferencesCopyWith<$Res>
implements $PreferencesCopyWith<$Res> {
factory _$PreferencesCopyWith(
_Preferences value, $Res Function(_Preferences) _then) =
__$PreferencesCopyWithImpl;
@override
@useResult
$Res call(
{ThemePreferences themePreference,
LanguagePreference languagePreference,
LockPreference lockPreference,
NotificationsPreference notificationsPreference});
@override
$ThemePreferencesCopyWith<$Res> get themePreference;
@override
$LockPreferenceCopyWith<$Res> get lockPreference;
@override
$NotificationsPreferenceCopyWith<$Res> get notificationsPreference;
}
/// @nodoc
class __$PreferencesCopyWithImpl<$Res> implements _$PreferencesCopyWith<$Res> {
__$PreferencesCopyWithImpl(this._self, this._then);
final _Preferences _self;
final $Res Function(_Preferences) _then;
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$Res call({
Object? themePreference = null,
Object? languagePreference = null,
Object? lockPreference = null,
Object? notificationsPreference = null,
}) {
return _then(_Preferences(
themePreference: null == themePreference
? _self.themePreference
: themePreference // ignore: cast_nullable_to_non_nullable
as ThemePreferences,
languagePreference: null == languagePreference
? _self.languagePreference
: languagePreference // ignore: cast_nullable_to_non_nullable
as LanguagePreference,
lockPreference: null == lockPreference
? _self.lockPreference
: lockPreference // ignore: cast_nullable_to_non_nullable
as LockPreference,
notificationsPreference: null == notificationsPreference
? _self.notificationsPreference
: notificationsPreference // ignore: cast_nullable_to_non_nullable
as NotificationsPreference,
));
}
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ThemePreferencesCopyWith<$Res> get themePreference {
return $ThemePreferencesCopyWith<$Res>(_self.themePreference, (value) {
return _then(_self.copyWith(themePreference: value));
});
}
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$LockPreferenceCopyWith<$Res> get lockPreference {
return $LockPreferenceCopyWith<$Res>(_self.lockPreference, (value) {
return _then(_self.copyWith(lockPreference: value));
});
}
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$NotificationsPreferenceCopyWith<$Res> get notificationsPreference {
return $NotificationsPreferenceCopyWith<$Res>(_self.notificationsPreference,
(value) {
return _then(_self.copyWith(notificationsPreference: value));
});
}
}
// dart format on