mirror of
				https://gitlab.com/veilid/veilidchat.git
				synced 2025-11-03 14:46:35 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			364 lines
		
	
	
	
		
			15 KiB
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			364 lines
		
	
	
	
		
			15 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 'notifications_preference.dart';
 | 
						|
 | 
						|
// **************************************************************************
 | 
						|
// FreezedGenerator
 | 
						|
// **************************************************************************
 | 
						|
 | 
						|
// dart format off
 | 
						|
T _$identity<T>(T value) => value;
 | 
						|
 | 
						|
/// @nodoc
 | 
						|
mixin _$NotificationsPreference {
 | 
						|
  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 =>
 | 
						|
      _$NotificationsPreferenceCopyWithImpl<NotificationsPreference>(
 | 
						|
          this as NotificationsPreference, _$identity);
 | 
						|
 | 
						|
  /// 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 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> {
 | 
						|
  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});
 | 
						|
}
 | 
						|
 | 
						|
/// @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
 | 
						|
  @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;
 | 
						|
 | 
						|
  /// Create a copy of NotificationsPreference
 | 
						|
  /// with the given fields replaced by the non-null parameter values.
 | 
						|
  @override
 | 
						|
  @JsonKey(includeFromJson: false, includeToJson: false)
 | 
						|
  @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
 |