Your commit message here
This commit is contained in:
@@ -32,13 +32,23 @@ class UserProfileAdapter extends TypeAdapter<UserProfile> {
|
||||
partnerName: fields[12] as String?,
|
||||
role: fields[14] == null ? UserRole.wife : fields[14] as UserRole,
|
||||
isIrregularCycle: fields[15] == null ? false : fields[15] as bool,
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
bibleTranslation: fields[16] == null
|
||||
? BibleTranslation.esv
|
||||
: fields[16] as BibleTranslation,
|
||||
>>>>>>> 6742220 (Your commit message here)
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void write(BinaryWriter writer, UserProfile obj) {
|
||||
writer
|
||||
<<<<<<< HEAD
|
||||
..writeByte(15)
|
||||
=======
|
||||
..writeByte(16)
|
||||
>>>>>>> 6742220 (Your commit message here)
|
||||
..writeByte(0)
|
||||
..write(obj.id)
|
||||
..writeByte(1)
|
||||
@@ -68,7 +78,13 @@ class UserProfileAdapter extends TypeAdapter<UserProfile> {
|
||||
..writeByte(14)
|
||||
..write(obj.role)
|
||||
..writeByte(15)
|
||||
<<<<<<< HEAD
|
||||
..write(obj.isIrregularCycle);
|
||||
=======
|
||||
..write(obj.isIrregularCycle)
|
||||
..writeByte(16)
|
||||
..write(obj.bibleTranslation);
|
||||
>>>>>>> 6742220 (Your commit message here)
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -170,6 +186,68 @@ class FertilityGoalAdapter extends TypeAdapter<FertilityGoal> {
|
||||
typeId == other.typeId;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
class BibleTranslationAdapter extends TypeAdapter<BibleTranslation> {
|
||||
@override
|
||||
final int typeId = 9;
|
||||
|
||||
@override
|
||||
BibleTranslation read(BinaryReader reader) {
|
||||
switch (reader.readByte()) {
|
||||
case 0:
|
||||
return BibleTranslation.esv;
|
||||
case 1:
|
||||
return BibleTranslation.niv;
|
||||
case 2:
|
||||
return BibleTranslation.nkjv;
|
||||
case 3:
|
||||
return BibleTranslation.nlt;
|
||||
case 4:
|
||||
return BibleTranslation.nasb;
|
||||
case 5:
|
||||
return BibleTranslation.kjv;
|
||||
default:
|
||||
return BibleTranslation.esv;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void write(BinaryWriter writer, BibleTranslation obj) {
|
||||
switch (obj) {
|
||||
case BibleTranslation.esv:
|
||||
writer.writeByte(0);
|
||||
break;
|
||||
case BibleTranslation.niv:
|
||||
writer.writeByte(1);
|
||||
break;
|
||||
case BibleTranslation.nkjv:
|
||||
writer.writeByte(2);
|
||||
break;
|
||||
case BibleTranslation.nlt:
|
||||
writer.writeByte(3);
|
||||
break;
|
||||
case BibleTranslation.nasb:
|
||||
writer.writeByte(4);
|
||||
break;
|
||||
case BibleTranslation.kjv:
|
||||
writer.writeByte(5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => typeId.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is BibleTranslationAdapter &&
|
||||
runtimeType == other.runtimeType &&
|
||||
typeId == other.typeId;
|
||||
}
|
||||
|
||||
>>>>>>> 6742220 (Your commit message here)
|
||||
class UserRoleAdapter extends TypeAdapter<UserRole> {
|
||||
@override
|
||||
final int typeId = 8;
|
||||
|
||||
Reference in New Issue
Block a user