mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-04-27 18:46:10 -04:00
232 lines
8.0 KiB
Dart
232 lines
8.0 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 'theme_preference.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// dart format off
|
|
T _$identity<T>(T value) => value;
|
|
|
|
/// @nodoc
|
|
mixin _$ThemePreferences {
|
|
BrightnessPreference get brightnessPreference;
|
|
ColorPreference get colorPreference;
|
|
double get displayScale;
|
|
bool get enableWallpaper;
|
|
|
|
/// Create a copy of ThemePreferences
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$ThemePreferencesCopyWith<ThemePreferences> get copyWith =>
|
|
_$ThemePreferencesCopyWithImpl<ThemePreferences>(
|
|
this as ThemePreferences, _$identity);
|
|
|
|
/// Serializes this ThemePreferences to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is ThemePreferences &&
|
|
(identical(other.brightnessPreference, brightnessPreference) ||
|
|
other.brightnessPreference == brightnessPreference) &&
|
|
(identical(other.colorPreference, colorPreference) ||
|
|
other.colorPreference == colorPreference) &&
|
|
(identical(other.displayScale, displayScale) ||
|
|
other.displayScale == displayScale) &&
|
|
(identical(other.enableWallpaper, enableWallpaper) ||
|
|
other.enableWallpaper == enableWallpaper));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, brightnessPreference,
|
|
colorPreference, displayScale, enableWallpaper);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ThemePreferences(brightnessPreference: $brightnessPreference, colorPreference: $colorPreference, displayScale: $displayScale, enableWallpaper: $enableWallpaper)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $ThemePreferencesCopyWith<$Res> {
|
|
factory $ThemePreferencesCopyWith(
|
|
ThemePreferences value, $Res Function(ThemePreferences) _then) =
|
|
_$ThemePreferencesCopyWithImpl;
|
|
@useResult
|
|
$Res call(
|
|
{BrightnessPreference brightnessPreference,
|
|
ColorPreference colorPreference,
|
|
double displayScale,
|
|
bool enableWallpaper});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$ThemePreferencesCopyWithImpl<$Res>
|
|
implements $ThemePreferencesCopyWith<$Res> {
|
|
_$ThemePreferencesCopyWithImpl(this._self, this._then);
|
|
|
|
final ThemePreferences _self;
|
|
final $Res Function(ThemePreferences) _then;
|
|
|
|
/// Create a copy of ThemePreferences
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? brightnessPreference = null,
|
|
Object? colorPreference = null,
|
|
Object? displayScale = null,
|
|
Object? enableWallpaper = null,
|
|
}) {
|
|
return _then(_self.copyWith(
|
|
brightnessPreference: null == brightnessPreference
|
|
? _self.brightnessPreference
|
|
: brightnessPreference // ignore: cast_nullable_to_non_nullable
|
|
as BrightnessPreference,
|
|
colorPreference: null == colorPreference
|
|
? _self.colorPreference
|
|
: colorPreference // ignore: cast_nullable_to_non_nullable
|
|
as ColorPreference,
|
|
displayScale: null == displayScale
|
|
? _self.displayScale
|
|
: displayScale // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
enableWallpaper: null == enableWallpaper
|
|
? _self.enableWallpaper
|
|
: enableWallpaper // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _ThemePreferences implements ThemePreferences {
|
|
const _ThemePreferences(
|
|
{this.brightnessPreference = BrightnessPreference.system,
|
|
this.colorPreference = ColorPreference.vapor,
|
|
this.displayScale = 1,
|
|
this.enableWallpaper = true});
|
|
factory _ThemePreferences.fromJson(Map<String, dynamic> json) =>
|
|
_$ThemePreferencesFromJson(json);
|
|
|
|
@override
|
|
@JsonKey()
|
|
final BrightnessPreference brightnessPreference;
|
|
@override
|
|
@JsonKey()
|
|
final ColorPreference colorPreference;
|
|
@override
|
|
@JsonKey()
|
|
final double displayScale;
|
|
@override
|
|
@JsonKey()
|
|
final bool enableWallpaper;
|
|
|
|
/// Create a copy of ThemePreferences
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$ThemePreferencesCopyWith<_ThemePreferences> get copyWith =>
|
|
__$ThemePreferencesCopyWithImpl<_ThemePreferences>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$ThemePreferencesToJson(
|
|
this,
|
|
);
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _ThemePreferences &&
|
|
(identical(other.brightnessPreference, brightnessPreference) ||
|
|
other.brightnessPreference == brightnessPreference) &&
|
|
(identical(other.colorPreference, colorPreference) ||
|
|
other.colorPreference == colorPreference) &&
|
|
(identical(other.displayScale, displayScale) ||
|
|
other.displayScale == displayScale) &&
|
|
(identical(other.enableWallpaper, enableWallpaper) ||
|
|
other.enableWallpaper == enableWallpaper));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, brightnessPreference,
|
|
colorPreference, displayScale, enableWallpaper);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ThemePreferences(brightnessPreference: $brightnessPreference, colorPreference: $colorPreference, displayScale: $displayScale, enableWallpaper: $enableWallpaper)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$ThemePreferencesCopyWith<$Res>
|
|
implements $ThemePreferencesCopyWith<$Res> {
|
|
factory _$ThemePreferencesCopyWith(
|
|
_ThemePreferences value, $Res Function(_ThemePreferences) _then) =
|
|
__$ThemePreferencesCopyWithImpl;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{BrightnessPreference brightnessPreference,
|
|
ColorPreference colorPreference,
|
|
double displayScale,
|
|
bool enableWallpaper});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$ThemePreferencesCopyWithImpl<$Res>
|
|
implements _$ThemePreferencesCopyWith<$Res> {
|
|
__$ThemePreferencesCopyWithImpl(this._self, this._then);
|
|
|
|
final _ThemePreferences _self;
|
|
final $Res Function(_ThemePreferences) _then;
|
|
|
|
/// Create a copy of ThemePreferences
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$Res call({
|
|
Object? brightnessPreference = null,
|
|
Object? colorPreference = null,
|
|
Object? displayScale = null,
|
|
Object? enableWallpaper = null,
|
|
}) {
|
|
return _then(_ThemePreferences(
|
|
brightnessPreference: null == brightnessPreference
|
|
? _self.brightnessPreference
|
|
: brightnessPreference // ignore: cast_nullable_to_non_nullable
|
|
as BrightnessPreference,
|
|
colorPreference: null == colorPreference
|
|
? _self.colorPreference
|
|
: colorPreference // ignore: cast_nullable_to_non_nullable
|
|
as ColorPreference,
|
|
displayScale: null == displayScale
|
|
? _self.displayScale
|
|
: displayScale // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
enableWallpaper: null == enableWallpaper
|
|
? _self.enableWallpaper
|
|
: enableWallpaper // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
));
|
|
}
|
|
}
|
|
|
|
// dart format on
|