Files
Tracker/lib/models/scripture.g.dart

58 lines
1.6 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'scripture.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class ScriptureAdapter extends TypeAdapter<Scripture> {
@override
final int typeId = 10;
@override
Scripture read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return Scripture(
verses: fields[0] == null
? {}
: (fields[0] as Map).cast<BibleTranslation, String>(),
reference: fields[1] as String,
reflection: fields[2] as String?,
applicablePhases:
fields[3] == null ? [] : (fields[3] as List).cast<String>(),
applicableContexts:
fields[4] == null ? [] : (fields[4] as List).cast<String>(),
);
}
@override
void write(BinaryWriter writer, Scripture obj) {
writer
..writeByte(5)
..writeByte(0)
..write(obj.verses)
..writeByte(1)
..write(obj.reference)
..writeByte(2)
..write(obj.reflection)
..writeByte(3)
..write(obj.applicablePhases)
..writeByte(4)
..write(obj.applicableContexts);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is ScriptureAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}