mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-17 05:32:20 -04:00
debugging work
This commit is contained in:
parent
739df7c427
commit
d6b1c20906
71 changed files with 4155 additions and 3616 deletions
|
@ -5,7 +5,7 @@ part 'notifications_preference.freezed.dart';
|
|||
part 'notifications_preference.g.dart';
|
||||
|
||||
@freezed
|
||||
class NotificationsPreference with _$NotificationsPreference {
|
||||
sealed class NotificationsPreference with _$NotificationsPreference {
|
||||
const factory NotificationsPreference({
|
||||
@Default(true) bool displayBetaWarning,
|
||||
@Default(true) bool enableBadge,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// dart format width=80
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
|
@ -9,270 +10,37 @@ part of 'notifications_preference.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
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');
|
||||
|
||||
NotificationsPreference _$NotificationsPreferenceFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return _NotificationsPreference.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$NotificationsPreference {
|
||||
bool get displayBetaWarning => throw _privateConstructorUsedError;
|
||||
bool get enableBadge => throw _privateConstructorUsedError;
|
||||
bool get enableNotifications => throw _privateConstructorUsedError;
|
||||
MessageNotificationContent get messageNotificationContent =>
|
||||
throw _privateConstructorUsedError;
|
||||
NotificationMode get onInvitationAcceptedMode =>
|
||||
throw _privateConstructorUsedError;
|
||||
SoundEffect get onInvitationAcceptedSound =>
|
||||
throw _privateConstructorUsedError;
|
||||
NotificationMode get onMessageReceivedMode =>
|
||||
throw _privateConstructorUsedError;
|
||||
SoundEffect get onMessageReceivedSound => throw _privateConstructorUsedError;
|
||||
SoundEffect get onMessageSentSound => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this NotificationsPreference to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
bool get displayBetaWarning;
|
||||
bool get enableBadge;
|
||||
bool get enableNotifications;
|
||||
MessageNotificationContent get messageNotificationContent;
|
||||
NotificationMode get onInvitationAcceptedMode;
|
||||
SoundEffect get onInvitationAcceptedSound;
|
||||
NotificationMode get onMessageReceivedMode;
|
||||
SoundEffect get onMessageReceivedSound;
|
||||
SoundEffect get onMessageSentSound;
|
||||
|
||||
/// Create a copy of NotificationsPreference
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$NotificationsPreferenceCopyWith<NotificationsPreference> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
_$NotificationsPreferenceCopyWithImpl<NotificationsPreference>(
|
||||
this as NotificationsPreference, _$identity);
|
||||
|
||||
/// @nodoc
|
||||
abstract class $NotificationsPreferenceCopyWith<$Res> {
|
||||
factory $NotificationsPreferenceCopyWith(NotificationsPreference value,
|
||||
$Res Function(NotificationsPreference) then) =
|
||||
_$NotificationsPreferenceCopyWithImpl<$Res, NotificationsPreference>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{bool displayBetaWarning,
|
||||
bool enableBadge,
|
||||
bool enableNotifications,
|
||||
MessageNotificationContent messageNotificationContent,
|
||||
NotificationMode onInvitationAcceptedMode,
|
||||
SoundEffect onInvitationAcceptedSound,
|
||||
NotificationMode onMessageReceivedMode,
|
||||
SoundEffect onMessageReceivedSound,
|
||||
SoundEffect onMessageSentSound});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$NotificationsPreferenceCopyWithImpl<$Res,
|
||||
$Val extends NotificationsPreference>
|
||||
implements $NotificationsPreferenceCopyWith<$Res> {
|
||||
_$NotificationsPreferenceCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of NotificationsPreference
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? displayBetaWarning = null,
|
||||
Object? enableBadge = null,
|
||||
Object? enableNotifications = null,
|
||||
Object? messageNotificationContent = null,
|
||||
Object? onInvitationAcceptedMode = null,
|
||||
Object? onInvitationAcceptedSound = null,
|
||||
Object? onMessageReceivedMode = null,
|
||||
Object? onMessageReceivedSound = null,
|
||||
Object? onMessageSentSound = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
displayBetaWarning: null == displayBetaWarning
|
||||
? _value.displayBetaWarning
|
||||
: displayBetaWarning // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
enableBadge: null == enableBadge
|
||||
? _value.enableBadge
|
||||
: enableBadge // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
enableNotifications: null == enableNotifications
|
||||
? _value.enableNotifications
|
||||
: enableNotifications // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
messageNotificationContent: null == messageNotificationContent
|
||||
? _value.messageNotificationContent
|
||||
: messageNotificationContent // ignore: cast_nullable_to_non_nullable
|
||||
as MessageNotificationContent,
|
||||
onInvitationAcceptedMode: null == onInvitationAcceptedMode
|
||||
? _value.onInvitationAcceptedMode
|
||||
: onInvitationAcceptedMode // ignore: cast_nullable_to_non_nullable
|
||||
as NotificationMode,
|
||||
onInvitationAcceptedSound: null == onInvitationAcceptedSound
|
||||
? _value.onInvitationAcceptedSound
|
||||
: onInvitationAcceptedSound // ignore: cast_nullable_to_non_nullable
|
||||
as SoundEffect,
|
||||
onMessageReceivedMode: null == onMessageReceivedMode
|
||||
? _value.onMessageReceivedMode
|
||||
: onMessageReceivedMode // ignore: cast_nullable_to_non_nullable
|
||||
as NotificationMode,
|
||||
onMessageReceivedSound: null == onMessageReceivedSound
|
||||
? _value.onMessageReceivedSound
|
||||
: onMessageReceivedSound // ignore: cast_nullable_to_non_nullable
|
||||
as SoundEffect,
|
||||
onMessageSentSound: null == onMessageSentSound
|
||||
? _value.onMessageSentSound
|
||||
: onMessageSentSound // ignore: cast_nullable_to_non_nullable
|
||||
as SoundEffect,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NotificationsPreferenceImplCopyWith<$Res>
|
||||
implements $NotificationsPreferenceCopyWith<$Res> {
|
||||
factory _$$NotificationsPreferenceImplCopyWith(
|
||||
_$NotificationsPreferenceImpl value,
|
||||
$Res Function(_$NotificationsPreferenceImpl) then) =
|
||||
__$$NotificationsPreferenceImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{bool displayBetaWarning,
|
||||
bool enableBadge,
|
||||
bool enableNotifications,
|
||||
MessageNotificationContent messageNotificationContent,
|
||||
NotificationMode onInvitationAcceptedMode,
|
||||
SoundEffect onInvitationAcceptedSound,
|
||||
NotificationMode onMessageReceivedMode,
|
||||
SoundEffect onMessageReceivedSound,
|
||||
SoundEffect onMessageSentSound});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NotificationsPreferenceImplCopyWithImpl<$Res>
|
||||
extends _$NotificationsPreferenceCopyWithImpl<$Res,
|
||||
_$NotificationsPreferenceImpl>
|
||||
implements _$$NotificationsPreferenceImplCopyWith<$Res> {
|
||||
__$$NotificationsPreferenceImplCopyWithImpl(
|
||||
_$NotificationsPreferenceImpl _value,
|
||||
$Res Function(_$NotificationsPreferenceImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of NotificationsPreference
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? displayBetaWarning = null,
|
||||
Object? enableBadge = null,
|
||||
Object? enableNotifications = null,
|
||||
Object? messageNotificationContent = null,
|
||||
Object? onInvitationAcceptedMode = null,
|
||||
Object? onInvitationAcceptedSound = null,
|
||||
Object? onMessageReceivedMode = null,
|
||||
Object? onMessageReceivedSound = null,
|
||||
Object? onMessageSentSound = null,
|
||||
}) {
|
||||
return _then(_$NotificationsPreferenceImpl(
|
||||
displayBetaWarning: null == displayBetaWarning
|
||||
? _value.displayBetaWarning
|
||||
: displayBetaWarning // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
enableBadge: null == enableBadge
|
||||
? _value.enableBadge
|
||||
: enableBadge // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
enableNotifications: null == enableNotifications
|
||||
? _value.enableNotifications
|
||||
: enableNotifications // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
messageNotificationContent: null == messageNotificationContent
|
||||
? _value.messageNotificationContent
|
||||
: messageNotificationContent // ignore: cast_nullable_to_non_nullable
|
||||
as MessageNotificationContent,
|
||||
onInvitationAcceptedMode: null == onInvitationAcceptedMode
|
||||
? _value.onInvitationAcceptedMode
|
||||
: onInvitationAcceptedMode // ignore: cast_nullable_to_non_nullable
|
||||
as NotificationMode,
|
||||
onInvitationAcceptedSound: null == onInvitationAcceptedSound
|
||||
? _value.onInvitationAcceptedSound
|
||||
: onInvitationAcceptedSound // ignore: cast_nullable_to_non_nullable
|
||||
as SoundEffect,
|
||||
onMessageReceivedMode: null == onMessageReceivedMode
|
||||
? _value.onMessageReceivedMode
|
||||
: onMessageReceivedMode // ignore: cast_nullable_to_non_nullable
|
||||
as NotificationMode,
|
||||
onMessageReceivedSound: null == onMessageReceivedSound
|
||||
? _value.onMessageReceivedSound
|
||||
: onMessageReceivedSound // ignore: cast_nullable_to_non_nullable
|
||||
as SoundEffect,
|
||||
onMessageSentSound: null == onMessageSentSound
|
||||
? _value.onMessageSentSound
|
||||
: onMessageSentSound // ignore: cast_nullable_to_non_nullable
|
||||
as SoundEffect,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$NotificationsPreferenceImpl implements _NotificationsPreference {
|
||||
const _$NotificationsPreferenceImpl(
|
||||
{this.displayBetaWarning = true,
|
||||
this.enableBadge = true,
|
||||
this.enableNotifications = true,
|
||||
this.messageNotificationContent =
|
||||
MessageNotificationContent.nameAndContent,
|
||||
this.onInvitationAcceptedMode = NotificationMode.inAppOrPush,
|
||||
this.onInvitationAcceptedSound = SoundEffect.beepBaDeep,
|
||||
this.onMessageReceivedMode = NotificationMode.inAppOrPush,
|
||||
this.onMessageReceivedSound = SoundEffect.boop,
|
||||
this.onMessageSentSound = SoundEffect.bonk});
|
||||
|
||||
factory _$NotificationsPreferenceImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$NotificationsPreferenceImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey()
|
||||
final bool displayBetaWarning;
|
||||
@override
|
||||
@JsonKey()
|
||||
final bool enableBadge;
|
||||
@override
|
||||
@JsonKey()
|
||||
final bool enableNotifications;
|
||||
@override
|
||||
@JsonKey()
|
||||
final MessageNotificationContent messageNotificationContent;
|
||||
@override
|
||||
@JsonKey()
|
||||
final NotificationMode onInvitationAcceptedMode;
|
||||
@override
|
||||
@JsonKey()
|
||||
final SoundEffect onInvitationAcceptedSound;
|
||||
@override
|
||||
@JsonKey()
|
||||
final NotificationMode onMessageReceivedMode;
|
||||
@override
|
||||
@JsonKey()
|
||||
final SoundEffect onMessageReceivedSound;
|
||||
@override
|
||||
@JsonKey()
|
||||
final SoundEffect onMessageSentSound;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'NotificationsPreference(displayBetaWarning: $displayBetaWarning, enableBadge: $enableBadge, enableNotifications: $enableNotifications, messageNotificationContent: $messageNotificationContent, onInvitationAcceptedMode: $onInvitationAcceptedMode, onInvitationAcceptedSound: $onInvitationAcceptedSound, onMessageReceivedMode: $onMessageReceivedMode, onMessageReceivedSound: $onMessageReceivedSound, onMessageSentSound: $onMessageSentSound)';
|
||||
}
|
||||
/// Serializes this NotificationsPreference to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NotificationsPreferenceImpl &&
|
||||
other is NotificationsPreference &&
|
||||
(identical(other.displayBetaWarning, displayBetaWarning) ||
|
||||
other.displayBetaWarning == displayBetaWarning) &&
|
||||
(identical(other.enableBadge, enableBadge) ||
|
||||
|
@ -311,61 +79,286 @@ class _$NotificationsPreferenceImpl implements _NotificationsPreference {
|
|||
onMessageReceivedSound,
|
||||
onMessageSentSound);
|
||||
|
||||
/// Create a copy of NotificationsPreference
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$NotificationsPreferenceImplCopyWith<_$NotificationsPreferenceImpl>
|
||||
get copyWith => __$$NotificationsPreferenceImplCopyWithImpl<
|
||||
_$NotificationsPreferenceImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$NotificationsPreferenceImplToJson(
|
||||
this,
|
||||
);
|
||||
String toString() {
|
||||
return 'NotificationsPreference(displayBetaWarning: $displayBetaWarning, enableBadge: $enableBadge, enableNotifications: $enableNotifications, messageNotificationContent: $messageNotificationContent, onInvitationAcceptedMode: $onInvitationAcceptedMode, onInvitationAcceptedSound: $onInvitationAcceptedSound, onMessageReceivedMode: $onMessageReceivedMode, onMessageReceivedSound: $onMessageReceivedSound, onMessageSentSound: $onMessageSentSound)';
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _NotificationsPreference implements NotificationsPreference {
|
||||
const factory _NotificationsPreference(
|
||||
{final bool displayBetaWarning,
|
||||
final bool enableBadge,
|
||||
final bool enableNotifications,
|
||||
final MessageNotificationContent messageNotificationContent,
|
||||
final NotificationMode onInvitationAcceptedMode,
|
||||
final SoundEffect onInvitationAcceptedSound,
|
||||
final NotificationMode onMessageReceivedMode,
|
||||
final SoundEffect onMessageReceivedSound,
|
||||
final SoundEffect onMessageSentSound}) = _$NotificationsPreferenceImpl;
|
||||
/// @nodoc
|
||||
abstract mixin class $NotificationsPreferenceCopyWith<$Res> {
|
||||
factory $NotificationsPreferenceCopyWith(NotificationsPreference value,
|
||||
$Res Function(NotificationsPreference) _then) =
|
||||
_$NotificationsPreferenceCopyWithImpl;
|
||||
@useResult
|
||||
$Res call(
|
||||
{bool displayBetaWarning,
|
||||
bool enableBadge,
|
||||
bool enableNotifications,
|
||||
MessageNotificationContent messageNotificationContent,
|
||||
NotificationMode onInvitationAcceptedMode,
|
||||
SoundEffect onInvitationAcceptedSound,
|
||||
NotificationMode onMessageReceivedMode,
|
||||
SoundEffect onMessageReceivedSound,
|
||||
SoundEffect onMessageSentSound});
|
||||
}
|
||||
|
||||
factory _NotificationsPreference.fromJson(Map<String, dynamic> json) =
|
||||
_$NotificationsPreferenceImpl.fromJson;
|
||||
/// @nodoc
|
||||
class _$NotificationsPreferenceCopyWithImpl<$Res>
|
||||
implements $NotificationsPreferenceCopyWith<$Res> {
|
||||
_$NotificationsPreferenceCopyWithImpl(this._self, this._then);
|
||||
|
||||
final NotificationsPreference _self;
|
||||
final $Res Function(NotificationsPreference) _then;
|
||||
|
||||
/// Create a copy of NotificationsPreference
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? displayBetaWarning = null,
|
||||
Object? enableBadge = null,
|
||||
Object? enableNotifications = null,
|
||||
Object? messageNotificationContent = null,
|
||||
Object? onInvitationAcceptedMode = null,
|
||||
Object? onInvitationAcceptedSound = null,
|
||||
Object? onMessageReceivedMode = null,
|
||||
Object? onMessageReceivedSound = null,
|
||||
Object? onMessageSentSound = null,
|
||||
}) {
|
||||
return _then(_self.copyWith(
|
||||
displayBetaWarning: null == displayBetaWarning
|
||||
? _self.displayBetaWarning
|
||||
: displayBetaWarning // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
enableBadge: null == enableBadge
|
||||
? _self.enableBadge
|
||||
: enableBadge // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
enableNotifications: null == enableNotifications
|
||||
? _self.enableNotifications
|
||||
: enableNotifications // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
messageNotificationContent: null == messageNotificationContent
|
||||
? _self.messageNotificationContent
|
||||
: messageNotificationContent // ignore: cast_nullable_to_non_nullable
|
||||
as MessageNotificationContent,
|
||||
onInvitationAcceptedMode: null == onInvitationAcceptedMode
|
||||
? _self.onInvitationAcceptedMode
|
||||
: onInvitationAcceptedMode // ignore: cast_nullable_to_non_nullable
|
||||
as NotificationMode,
|
||||
onInvitationAcceptedSound: null == onInvitationAcceptedSound
|
||||
? _self.onInvitationAcceptedSound
|
||||
: onInvitationAcceptedSound // ignore: cast_nullable_to_non_nullable
|
||||
as SoundEffect,
|
||||
onMessageReceivedMode: null == onMessageReceivedMode
|
||||
? _self.onMessageReceivedMode
|
||||
: onMessageReceivedMode // ignore: cast_nullable_to_non_nullable
|
||||
as NotificationMode,
|
||||
onMessageReceivedSound: null == onMessageReceivedSound
|
||||
? _self.onMessageReceivedSound
|
||||
: onMessageReceivedSound // ignore: cast_nullable_to_non_nullable
|
||||
as SoundEffect,
|
||||
onMessageSentSound: null == onMessageSentSound
|
||||
? _self.onMessageSentSound
|
||||
: onMessageSentSound // ignore: cast_nullable_to_non_nullable
|
||||
as SoundEffect,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _NotificationsPreference implements NotificationsPreference {
|
||||
const _NotificationsPreference(
|
||||
{this.displayBetaWarning = true,
|
||||
this.enableBadge = true,
|
||||
this.enableNotifications = true,
|
||||
this.messageNotificationContent =
|
||||
MessageNotificationContent.nameAndContent,
|
||||
this.onInvitationAcceptedMode = NotificationMode.inAppOrPush,
|
||||
this.onInvitationAcceptedSound = SoundEffect.beepBaDeep,
|
||||
this.onMessageReceivedMode = NotificationMode.inAppOrPush,
|
||||
this.onMessageReceivedSound = SoundEffect.boop,
|
||||
this.onMessageSentSound = SoundEffect.bonk});
|
||||
factory _NotificationsPreference.fromJson(Map<String, dynamic> json) =>
|
||||
_$NotificationsPreferenceFromJson(json);
|
||||
|
||||
@override
|
||||
bool get displayBetaWarning;
|
||||
@JsonKey()
|
||||
final bool displayBetaWarning;
|
||||
@override
|
||||
bool get enableBadge;
|
||||
@JsonKey()
|
||||
final bool enableBadge;
|
||||
@override
|
||||
bool get enableNotifications;
|
||||
@JsonKey()
|
||||
final bool enableNotifications;
|
||||
@override
|
||||
MessageNotificationContent get messageNotificationContent;
|
||||
@JsonKey()
|
||||
final MessageNotificationContent messageNotificationContent;
|
||||
@override
|
||||
NotificationMode get onInvitationAcceptedMode;
|
||||
@JsonKey()
|
||||
final NotificationMode onInvitationAcceptedMode;
|
||||
@override
|
||||
SoundEffect get onInvitationAcceptedSound;
|
||||
@JsonKey()
|
||||
final SoundEffect onInvitationAcceptedSound;
|
||||
@override
|
||||
NotificationMode get onMessageReceivedMode;
|
||||
@JsonKey()
|
||||
final NotificationMode onMessageReceivedMode;
|
||||
@override
|
||||
SoundEffect get onMessageReceivedSound;
|
||||
@JsonKey()
|
||||
final SoundEffect onMessageReceivedSound;
|
||||
@override
|
||||
SoundEffect get onMessageSentSound;
|
||||
@JsonKey()
|
||||
final SoundEffect onMessageSentSound;
|
||||
|
||||
/// Create a copy of NotificationsPreference
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$NotificationsPreferenceImplCopyWith<_$NotificationsPreferenceImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
@pragma('vm:prefer-inline')
|
||||
_$NotificationsPreferenceCopyWith<_NotificationsPreference> get copyWith =>
|
||||
__$NotificationsPreferenceCopyWithImpl<_NotificationsPreference>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$NotificationsPreferenceToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _NotificationsPreference &&
|
||||
(identical(other.displayBetaWarning, displayBetaWarning) ||
|
||||
other.displayBetaWarning == displayBetaWarning) &&
|
||||
(identical(other.enableBadge, enableBadge) ||
|
||||
other.enableBadge == enableBadge) &&
|
||||
(identical(other.enableNotifications, enableNotifications) ||
|
||||
other.enableNotifications == enableNotifications) &&
|
||||
(identical(other.messageNotificationContent,
|
||||
messageNotificationContent) ||
|
||||
other.messageNotificationContent ==
|
||||
messageNotificationContent) &&
|
||||
(identical(
|
||||
other.onInvitationAcceptedMode, onInvitationAcceptedMode) ||
|
||||
other.onInvitationAcceptedMode == onInvitationAcceptedMode) &&
|
||||
(identical(other.onInvitationAcceptedSound,
|
||||
onInvitationAcceptedSound) ||
|
||||
other.onInvitationAcceptedSound == onInvitationAcceptedSound) &&
|
||||
(identical(other.onMessageReceivedMode, onMessageReceivedMode) ||
|
||||
other.onMessageReceivedMode == onMessageReceivedMode) &&
|
||||
(identical(other.onMessageReceivedSound, onMessageReceivedSound) ||
|
||||
other.onMessageReceivedSound == onMessageReceivedSound) &&
|
||||
(identical(other.onMessageSentSound, onMessageSentSound) ||
|
||||
other.onMessageSentSound == onMessageSentSound));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
displayBetaWarning,
|
||||
enableBadge,
|
||||
enableNotifications,
|
||||
messageNotificationContent,
|
||||
onInvitationAcceptedMode,
|
||||
onInvitationAcceptedSound,
|
||||
onMessageReceivedMode,
|
||||
onMessageReceivedSound,
|
||||
onMessageSentSound);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'NotificationsPreference(displayBetaWarning: $displayBetaWarning, enableBadge: $enableBadge, enableNotifications: $enableNotifications, messageNotificationContent: $messageNotificationContent, onInvitationAcceptedMode: $onInvitationAcceptedMode, onInvitationAcceptedSound: $onInvitationAcceptedSound, onMessageReceivedMode: $onMessageReceivedMode, onMessageReceivedSound: $onMessageReceivedSound, onMessageSentSound: $onMessageSentSound)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$NotificationsPreferenceCopyWith<$Res>
|
||||
implements $NotificationsPreferenceCopyWith<$Res> {
|
||||
factory _$NotificationsPreferenceCopyWith(_NotificationsPreference value,
|
||||
$Res Function(_NotificationsPreference) _then) =
|
||||
__$NotificationsPreferenceCopyWithImpl;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{bool displayBetaWarning,
|
||||
bool enableBadge,
|
||||
bool enableNotifications,
|
||||
MessageNotificationContent messageNotificationContent,
|
||||
NotificationMode onInvitationAcceptedMode,
|
||||
SoundEffect onInvitationAcceptedSound,
|
||||
NotificationMode onMessageReceivedMode,
|
||||
SoundEffect onMessageReceivedSound,
|
||||
SoundEffect onMessageSentSound});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$NotificationsPreferenceCopyWithImpl<$Res>
|
||||
implements _$NotificationsPreferenceCopyWith<$Res> {
|
||||
__$NotificationsPreferenceCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _NotificationsPreference _self;
|
||||
final $Res Function(_NotificationsPreference) _then;
|
||||
|
||||
/// Create a copy of NotificationsPreference
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$Res call({
|
||||
Object? displayBetaWarning = null,
|
||||
Object? enableBadge = null,
|
||||
Object? enableNotifications = null,
|
||||
Object? messageNotificationContent = null,
|
||||
Object? onInvitationAcceptedMode = null,
|
||||
Object? onInvitationAcceptedSound = null,
|
||||
Object? onMessageReceivedMode = null,
|
||||
Object? onMessageReceivedSound = null,
|
||||
Object? onMessageSentSound = null,
|
||||
}) {
|
||||
return _then(_NotificationsPreference(
|
||||
displayBetaWarning: null == displayBetaWarning
|
||||
? _self.displayBetaWarning
|
||||
: displayBetaWarning // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
enableBadge: null == enableBadge
|
||||
? _self.enableBadge
|
||||
: enableBadge // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
enableNotifications: null == enableNotifications
|
||||
? _self.enableNotifications
|
||||
: enableNotifications // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
messageNotificationContent: null == messageNotificationContent
|
||||
? _self.messageNotificationContent
|
||||
: messageNotificationContent // ignore: cast_nullable_to_non_nullable
|
||||
as MessageNotificationContent,
|
||||
onInvitationAcceptedMode: null == onInvitationAcceptedMode
|
||||
? _self.onInvitationAcceptedMode
|
||||
: onInvitationAcceptedMode // ignore: cast_nullable_to_non_nullable
|
||||
as NotificationMode,
|
||||
onInvitationAcceptedSound: null == onInvitationAcceptedSound
|
||||
? _self.onInvitationAcceptedSound
|
||||
: onInvitationAcceptedSound // ignore: cast_nullable_to_non_nullable
|
||||
as SoundEffect,
|
||||
onMessageReceivedMode: null == onMessageReceivedMode
|
||||
? _self.onMessageReceivedMode
|
||||
: onMessageReceivedMode // ignore: cast_nullable_to_non_nullable
|
||||
as NotificationMode,
|
||||
onMessageReceivedSound: null == onMessageReceivedSound
|
||||
? _self.onMessageReceivedSound
|
||||
: onMessageReceivedSound // ignore: cast_nullable_to_non_nullable
|
||||
as SoundEffect,
|
||||
onMessageSentSound: null == onMessageSentSound
|
||||
? _self.onMessageSentSound
|
||||
: onMessageSentSound // ignore: cast_nullable_to_non_nullable
|
||||
as SoundEffect,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
|
|
@ -6,9 +6,9 @@ part of 'notifications_preference.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$NotificationsPreferenceImpl _$$NotificationsPreferenceImplFromJson(
|
||||
_NotificationsPreference _$NotificationsPreferenceFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$NotificationsPreferenceImpl(
|
||||
_NotificationsPreference(
|
||||
displayBetaWarning: json['display_beta_warning'] as bool? ?? true,
|
||||
enableBadge: json['enable_badge'] as bool? ?? true,
|
||||
enableNotifications: json['enable_notifications'] as bool? ?? true,
|
||||
|
@ -33,8 +33,8 @@ _$NotificationsPreferenceImpl _$$NotificationsPreferenceImplFromJson(
|
|||
: SoundEffect.fromJson(json['on_message_sent_sound']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$NotificationsPreferenceImplToJson(
|
||||
_$NotificationsPreferenceImpl instance) =>
|
||||
Map<String, dynamic> _$NotificationsPreferenceToJson(
|
||||
_NotificationsPreference instance) =>
|
||||
<String, dynamic>{
|
||||
'display_beta_warning': instance.displayBetaWarning,
|
||||
'enable_badge': instance.enableBadge,
|
||||
|
|
|
@ -9,7 +9,7 @@ enum NotificationType {
|
|||
}
|
||||
|
||||
@freezed
|
||||
class NotificationItem with _$NotificationItem {
|
||||
sealed class NotificationItem with _$NotificationItem {
|
||||
const factory NotificationItem(
|
||||
{required NotificationType type,
|
||||
required String text,
|
||||
|
@ -17,7 +17,7 @@ class NotificationItem with _$NotificationItem {
|
|||
}
|
||||
|
||||
@freezed
|
||||
class NotificationsState with _$NotificationsState {
|
||||
sealed class NotificationsState with _$NotificationsState {
|
||||
const factory NotificationsState({required IList<NotificationItem> queue}) =
|
||||
_NotificationsState;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// dart format width=80
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
|
@ -9,137 +10,28 @@ part of 'notifications_state.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
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 _$NotificationItem {
|
||||
NotificationType get type => throw _privateConstructorUsedError;
|
||||
String get text => throw _privateConstructorUsedError;
|
||||
String? get title => throw _privateConstructorUsedError;
|
||||
NotificationType get type;
|
||||
String get text;
|
||||
String? get title;
|
||||
|
||||
/// Create a copy of NotificationItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$NotificationItemCopyWith<NotificationItem> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $NotificationItemCopyWith<$Res> {
|
||||
factory $NotificationItemCopyWith(
|
||||
NotificationItem value, $Res Function(NotificationItem) then) =
|
||||
_$NotificationItemCopyWithImpl<$Res, NotificationItem>;
|
||||
@useResult
|
||||
$Res call({NotificationType type, String text, String? title});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$NotificationItemCopyWithImpl<$Res, $Val extends NotificationItem>
|
||||
implements $NotificationItemCopyWith<$Res> {
|
||||
_$NotificationItemCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of NotificationItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? type = null,
|
||||
Object? text = null,
|
||||
Object? title = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
type: null == type
|
||||
? _value.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as NotificationType,
|
||||
text: null == text
|
||||
? _value.text
|
||||
: text // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
title: freezed == title
|
||||
? _value.title
|
||||
: title // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NotificationItemImplCopyWith<$Res>
|
||||
implements $NotificationItemCopyWith<$Res> {
|
||||
factory _$$NotificationItemImplCopyWith(_$NotificationItemImpl value,
|
||||
$Res Function(_$NotificationItemImpl) then) =
|
||||
__$$NotificationItemImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({NotificationType type, String text, String? title});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NotificationItemImplCopyWithImpl<$Res>
|
||||
extends _$NotificationItemCopyWithImpl<$Res, _$NotificationItemImpl>
|
||||
implements _$$NotificationItemImplCopyWith<$Res> {
|
||||
__$$NotificationItemImplCopyWithImpl(_$NotificationItemImpl _value,
|
||||
$Res Function(_$NotificationItemImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of NotificationItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? type = null,
|
||||
Object? text = null,
|
||||
Object? title = freezed,
|
||||
}) {
|
||||
return _then(_$NotificationItemImpl(
|
||||
type: null == type
|
||||
? _value.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as NotificationType,
|
||||
text: null == text
|
||||
? _value.text
|
||||
: text // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
title: freezed == title
|
||||
? _value.title
|
||||
: title // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$NotificationItemImpl implements _NotificationItem {
|
||||
const _$NotificationItemImpl(
|
||||
{required this.type, required this.text, this.title});
|
||||
|
||||
@override
|
||||
final NotificationType type;
|
||||
@override
|
||||
final String text;
|
||||
@override
|
||||
final String? title;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'NotificationItem(type: $type, text: $text, title: $title)';
|
||||
}
|
||||
_$NotificationItemCopyWithImpl<NotificationItem>(
|
||||
this as NotificationItem, _$identity);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NotificationItemImpl &&
|
||||
other is NotificationItem &&
|
||||
(identical(other.type, type) || other.type == type) &&
|
||||
(identical(other.text, text) || other.text == text) &&
|
||||
(identical(other.title, title) || other.title == title));
|
||||
|
@ -148,101 +40,185 @@ class _$NotificationItemImpl implements _NotificationItem {
|
|||
@override
|
||||
int get hashCode => Object.hash(runtimeType, type, text, title);
|
||||
|
||||
/// Create a copy of NotificationItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$NotificationItemImplCopyWith<_$NotificationItemImpl> get copyWith =>
|
||||
__$$NotificationItemImplCopyWithImpl<_$NotificationItemImpl>(
|
||||
this, _$identity);
|
||||
}
|
||||
|
||||
abstract class _NotificationItem implements NotificationItem {
|
||||
const factory _NotificationItem(
|
||||
{required final NotificationType type,
|
||||
required final String text,
|
||||
final String? title}) = _$NotificationItemImpl;
|
||||
|
||||
@override
|
||||
NotificationType get type;
|
||||
@override
|
||||
String get text;
|
||||
@override
|
||||
String? get title;
|
||||
|
||||
/// Create a copy of NotificationItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$NotificationItemImplCopyWith<_$NotificationItemImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$NotificationsState {
|
||||
IList<NotificationItem> get queue => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of NotificationsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$NotificationsStateCopyWith<NotificationsState> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $NotificationsStateCopyWith<$Res> {
|
||||
factory $NotificationsStateCopyWith(
|
||||
NotificationsState value, $Res Function(NotificationsState) then) =
|
||||
_$NotificationsStateCopyWithImpl<$Res, NotificationsState>;
|
||||
@useResult
|
||||
$Res call({IList<NotificationItem> queue});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState>
|
||||
implements $NotificationsStateCopyWith<$Res> {
|
||||
_$NotificationsStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of NotificationsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? queue = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
queue: null == queue
|
||||
? _value.queue
|
||||
: queue // ignore: cast_nullable_to_non_nullable
|
||||
as IList<NotificationItem>,
|
||||
) as $Val);
|
||||
String toString() {
|
||||
return 'NotificationItem(type: $type, text: $text, title: $title)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NotificationsStateImplCopyWith<$Res>
|
||||
implements $NotificationsStateCopyWith<$Res> {
|
||||
factory _$$NotificationsStateImplCopyWith(_$NotificationsStateImpl value,
|
||||
$Res Function(_$NotificationsStateImpl) then) =
|
||||
__$$NotificationsStateImplCopyWithImpl<$Res>;
|
||||
abstract mixin class $NotificationItemCopyWith<$Res> {
|
||||
factory $NotificationItemCopyWith(
|
||||
NotificationItem value, $Res Function(NotificationItem) _then) =
|
||||
_$NotificationItemCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({NotificationType type, String text, String? title});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$NotificationItemCopyWithImpl<$Res>
|
||||
implements $NotificationItemCopyWith<$Res> {
|
||||
_$NotificationItemCopyWithImpl(this._self, this._then);
|
||||
|
||||
final NotificationItem _self;
|
||||
final $Res Function(NotificationItem) _then;
|
||||
|
||||
/// Create a copy of NotificationItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? type = null,
|
||||
Object? text = null,
|
||||
Object? title = freezed,
|
||||
}) {
|
||||
return _then(_self.copyWith(
|
||||
type: null == type
|
||||
? _self.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as NotificationType,
|
||||
text: null == text
|
||||
? _self.text
|
||||
: text // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
title: freezed == title
|
||||
? _self.title
|
||||
: title // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _NotificationItem implements NotificationItem {
|
||||
const _NotificationItem({required this.type, required this.text, this.title});
|
||||
|
||||
@override
|
||||
final NotificationType type;
|
||||
@override
|
||||
final String text;
|
||||
@override
|
||||
final String? title;
|
||||
|
||||
/// Create a copy of NotificationItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$NotificationItemCopyWith<_NotificationItem> get copyWith =>
|
||||
__$NotificationItemCopyWithImpl<_NotificationItem>(this, _$identity);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _NotificationItem &&
|
||||
(identical(other.type, type) || other.type == type) &&
|
||||
(identical(other.text, text) || other.text == text) &&
|
||||
(identical(other.title, title) || other.title == title));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, type, text, title);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'NotificationItem(type: $type, text: $text, title: $title)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$NotificationItemCopyWith<$Res>
|
||||
implements $NotificationItemCopyWith<$Res> {
|
||||
factory _$NotificationItemCopyWith(
|
||||
_NotificationItem value, $Res Function(_NotificationItem) _then) =
|
||||
__$NotificationItemCopyWithImpl;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({NotificationType type, String text, String? title});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$NotificationItemCopyWithImpl<$Res>
|
||||
implements _$NotificationItemCopyWith<$Res> {
|
||||
__$NotificationItemCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _NotificationItem _self;
|
||||
final $Res Function(_NotificationItem) _then;
|
||||
|
||||
/// Create a copy of NotificationItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$Res call({
|
||||
Object? type = null,
|
||||
Object? text = null,
|
||||
Object? title = freezed,
|
||||
}) {
|
||||
return _then(_NotificationItem(
|
||||
type: null == type
|
||||
? _self.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as NotificationType,
|
||||
text: null == text
|
||||
? _self.text
|
||||
: text // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
title: freezed == title
|
||||
? _self.title
|
||||
: title // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$NotificationsState {
|
||||
IList<NotificationItem> get queue;
|
||||
|
||||
/// Create a copy of NotificationsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$NotificationsStateCopyWith<NotificationsState> get copyWith =>
|
||||
_$NotificationsStateCopyWithImpl<NotificationsState>(
|
||||
this as NotificationsState, _$identity);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is NotificationsState &&
|
||||
const DeepCollectionEquality().equals(other.queue, queue));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, const DeepCollectionEquality().hash(queue));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'NotificationsState(queue: $queue)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $NotificationsStateCopyWith<$Res> {
|
||||
factory $NotificationsStateCopyWith(
|
||||
NotificationsState value, $Res Function(NotificationsState) _then) =
|
||||
_$NotificationsStateCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({IList<NotificationItem> queue});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NotificationsStateImplCopyWithImpl<$Res>
|
||||
extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateImpl>
|
||||
implements _$$NotificationsStateImplCopyWith<$Res> {
|
||||
__$$NotificationsStateImplCopyWithImpl(_$NotificationsStateImpl _value,
|
||||
$Res Function(_$NotificationsStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
class _$NotificationsStateCopyWithImpl<$Res>
|
||||
implements $NotificationsStateCopyWith<$Res> {
|
||||
_$NotificationsStateCopyWithImpl(this._self, this._then);
|
||||
|
||||
final NotificationsState _self;
|
||||
final $Res Function(NotificationsState) _then;
|
||||
|
||||
/// Create a copy of NotificationsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
@ -251,9 +227,9 @@ class __$$NotificationsStateImplCopyWithImpl<$Res>
|
|||
$Res call({
|
||||
Object? queue = null,
|
||||
}) {
|
||||
return _then(_$NotificationsStateImpl(
|
||||
return _then(_self.copyWith(
|
||||
queue: null == queue
|
||||
? _value.queue
|
||||
? _self.queue
|
||||
: queue // ignore: cast_nullable_to_non_nullable
|
||||
as IList<NotificationItem>,
|
||||
));
|
||||
|
@ -262,22 +238,25 @@ class __$$NotificationsStateImplCopyWithImpl<$Res>
|
|||
|
||||
/// @nodoc
|
||||
|
||||
class _$NotificationsStateImpl implements _NotificationsState {
|
||||
const _$NotificationsStateImpl({required this.queue});
|
||||
class _NotificationsState implements NotificationsState {
|
||||
const _NotificationsState({required this.queue});
|
||||
|
||||
@override
|
||||
final IList<NotificationItem> queue;
|
||||
|
||||
/// Create a copy of NotificationsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
String toString() {
|
||||
return 'NotificationsState(queue: $queue)';
|
||||
}
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$NotificationsStateCopyWith<_NotificationsState> get copyWith =>
|
||||
__$NotificationsStateCopyWithImpl<_NotificationsState>(this, _$identity);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NotificationsStateImpl &&
|
||||
other is _NotificationsState &&
|
||||
const DeepCollectionEquality().equals(other.queue, queue));
|
||||
}
|
||||
|
||||
|
@ -285,28 +264,45 @@ class _$NotificationsStateImpl implements _NotificationsState {
|
|||
int get hashCode =>
|
||||
Object.hash(runtimeType, const DeepCollectionEquality().hash(queue));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'NotificationsState(queue: $queue)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$NotificationsStateCopyWith<$Res>
|
||||
implements $NotificationsStateCopyWith<$Res> {
|
||||
factory _$NotificationsStateCopyWith(
|
||||
_NotificationsState value, $Res Function(_NotificationsState) _then) =
|
||||
__$NotificationsStateCopyWithImpl;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({IList<NotificationItem> queue});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$NotificationsStateCopyWithImpl<$Res>
|
||||
implements _$NotificationsStateCopyWith<$Res> {
|
||||
__$NotificationsStateCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _NotificationsState _self;
|
||||
final $Res Function(_NotificationsState) _then;
|
||||
|
||||
/// Create a copy of NotificationsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$NotificationsStateImplCopyWith<_$NotificationsStateImpl> get copyWith =>
|
||||
__$$NotificationsStateImplCopyWithImpl<_$NotificationsStateImpl>(
|
||||
this, _$identity);
|
||||
$Res call({
|
||||
Object? queue = null,
|
||||
}) {
|
||||
return _then(_NotificationsState(
|
||||
queue: null == queue
|
||||
? _self.queue
|
||||
: queue // ignore: cast_nullable_to_non_nullable
|
||||
as IList<NotificationItem>,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _NotificationsState implements NotificationsState {
|
||||
const factory _NotificationsState(
|
||||
{required final IList<NotificationItem> queue}) =
|
||||
_$NotificationsStateImpl;
|
||||
|
||||
@override
|
||||
IList<NotificationItem> get queue;
|
||||
|
||||
/// Create a copy of NotificationsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$NotificationsStateImplCopyWith<_$NotificationsStateImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
// dart format on
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue