99 lines
3.5 KiB
Dart
99 lines
3.5 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'app_settings.dart';
|
|
|
|
// **************************************************************************
|
|
// TypeAdapterGenerator
|
|
// **************************************************************************
|
|
|
|
class AppSettingsAdapter extends TypeAdapter<AppSettings> {
|
|
@override
|
|
final int typeId = 0;
|
|
|
|
@override
|
|
AppSettings read(BinaryReader reader) {
|
|
final numOfFields = reader.readByte();
|
|
final fields = <int, dynamic>{
|
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
|
};
|
|
return AppSettings(
|
|
userName: fields.containsKey(0) ? fields[0] as String? ?? '' : '',
|
|
userEmail: fields.containsKey(1) ? fields[1] as String? ?? '' : '',
|
|
themeModeIndex: fields.containsKey(2) ? fields[2] as int? ?? 0 : 0,
|
|
arabicFontSize: fields.containsKey(3) ? fields[3] as double? ?? 26.0 : 26.0,
|
|
uiLanguage: fields.containsKey(4) ? fields[4] as String? ?? 'id' : 'id',
|
|
adhanEnabled: fields.containsKey(5) ? (fields[5] as Map?)?.cast<String, bool>() : null,
|
|
iqamahOffset: fields.containsKey(6) ? (fields[6] as Map?)?.cast<String, int>() : null,
|
|
checklistReminderTime: fields.containsKey(7) ? fields[7] as String? : null,
|
|
lastLat: fields.containsKey(8) ? fields[8] as double? : null,
|
|
lastLng: fields.containsKey(9) ? fields[9] as double? : null,
|
|
lastCityName: fields.containsKey(10) ? fields[10] as String? : null,
|
|
rawatibLevel: fields.containsKey(11) ? fields[11] as int? ?? 1 : 1,
|
|
tilawahTargetValue: fields.containsKey(12) ? fields[12] as int? ?? 1 : 1,
|
|
tilawahTargetUnit: fields.containsKey(13) ? fields[13] as String? ?? 'Juz' : 'Juz',
|
|
tilawahAutoSync: fields.containsKey(14) ? fields[14] as bool? ?? false : false,
|
|
trackDzikir: fields.containsKey(15) ? fields[15] as bool? ?? true : true,
|
|
trackPuasa: fields.containsKey(16) ? fields[16] as bool? ?? false : false,
|
|
showLatin: fields.containsKey(17) ? fields[17] as bool? ?? true : true,
|
|
showTerjemahan: fields.containsKey(18) ? fields[18] as bool? ?? true : true,
|
|
simpleMode: fields.containsKey(19) ? fields[19] as bool? ?? false : false,
|
|
);
|
|
}
|
|
|
|
@override
|
|
void write(BinaryWriter writer, AppSettings obj) {
|
|
writer
|
|
..writeByte(20)
|
|
..writeByte(0)
|
|
..write(obj.userName)
|
|
..writeByte(1)
|
|
..write(obj.userEmail)
|
|
..writeByte(2)
|
|
..write(obj.themeModeIndex)
|
|
..writeByte(3)
|
|
..write(obj.arabicFontSize)
|
|
..writeByte(4)
|
|
..write(obj.uiLanguage)
|
|
..writeByte(5)
|
|
..write(obj.adhanEnabled)
|
|
..writeByte(6)
|
|
..write(obj.iqamahOffset)
|
|
..writeByte(7)
|
|
..write(obj.checklistReminderTime)
|
|
..writeByte(8)
|
|
..write(obj.lastLat)
|
|
..writeByte(9)
|
|
..write(obj.lastLng)
|
|
..writeByte(10)
|
|
..write(obj.lastCityName)
|
|
..writeByte(11)
|
|
..write(obj.rawatibLevel)
|
|
..writeByte(12)
|
|
..write(obj.tilawahTargetValue)
|
|
..writeByte(13)
|
|
..write(obj.tilawahTargetUnit)
|
|
..writeByte(14)
|
|
..write(obj.tilawahAutoSync)
|
|
..writeByte(15)
|
|
..write(obj.trackDzikir)
|
|
..writeByte(16)
|
|
..write(obj.trackPuasa)
|
|
..writeByte(17)
|
|
..write(obj.showLatin)
|
|
..writeByte(18)
|
|
..write(obj.showTerjemahan)
|
|
..writeByte(19)
|
|
..write(obj.simpleMode);
|
|
}
|
|
|
|
@override
|
|
int get hashCode => typeId.hashCode;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is AppSettingsAdapter &&
|
|
runtimeType == other.runtimeType &&
|
|
typeId == other.typeId;
|
|
}
|