// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'notification_settings.dart';

// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************

class NotificationSettingsAdapter extends TypeAdapter<NotificationSettings> {
  @override
  final int typeId = 25;

  @override
  NotificationSettings read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return NotificationSettings(
      enableNotifications: fields[0] as bool,
      soundEnabled: fields[1] as bool,
      vibrationEnabled: fields[2] as bool,
      mutedConversations: (fields[3] as List).cast<String>(),
      showPreview: fields[4] as bool,
      conversationNotifications: (fields[5] as Map).cast<String, bool>(),
      doNotDisturb: fields[6] as bool,
      doNotDisturbStart: fields[7] as DateTime?,
      doNotDisturbEnd: fields[8] as DateTime?,
      deviceToken: fields[9] as String?,
    );
  }

  @override
  void write(BinaryWriter writer, NotificationSettings obj) {
    writer
      ..writeByte(10)
      ..writeByte(0)
      ..write(obj.enableNotifications)
      ..writeByte(1)
      ..write(obj.soundEnabled)
      ..writeByte(2)
      ..write(obj.vibrationEnabled)
      ..writeByte(3)
      ..write(obj.mutedConversations)
      ..writeByte(4)
      ..write(obj.showPreview)
      ..writeByte(5)
      ..write(obj.conversationNotifications)
      ..writeByte(6)
      ..write(obj.doNotDisturb)
      ..writeByte(7)
      ..write(obj.doNotDisturbStart)
      ..writeByte(8)
      ..write(obj.doNotDisturbEnd)
      ..writeByte(9)
      ..write(obj.deviceToken);
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is NotificationSettingsAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}
