Implement Notifications and Pad Tracking Enhancements

This commit is contained in:
2026-01-08 15:46:28 -06:00
parent 9ae77e7ab0
commit 512577b092
19 changed files with 3059 additions and 1576 deletions

View File

@@ -49,13 +49,14 @@ class CycleEntryAdapter extends TypeAdapter<CycleEntry> {
husbandNotes: fields[28] as String?,
usedPantyliner: fields[30] == null ? false : fields[30] as bool,
pantylinerCount: fields[31] == null ? 0 : fields[31] as int,
prayerRequest: fields[32] as String?,
);
}
@override
void write(BinaryWriter writer, CycleEntry obj) {
writer
..writeByte(32)
..writeByte(33)
..writeByte(0)
..write(obj.id)
..writeByte(1)
@@ -119,7 +120,9 @@ class CycleEntryAdapter extends TypeAdapter<CycleEntry> {
..writeByte(30)
..write(obj.usedPantyliner)
..writeByte(31)
..write(obj.pantylinerCount);
..write(obj.pantylinerCount)
..writeByte(32)
..write(obj.prayerRequest);
}
@override
@@ -194,6 +197,8 @@ class FlowIntensityAdapter extends TypeAdapter<FlowIntensity> {
@override
FlowIntensity read(BinaryReader reader) {
switch (reader.readByte()) {
case 4:
return FlowIntensity.none;
case 0:
return FlowIntensity.spotting;
case 1:
@@ -203,13 +208,16 @@ class FlowIntensityAdapter extends TypeAdapter<FlowIntensity> {
case 3:
return FlowIntensity.heavy;
default:
return FlowIntensity.spotting;
return FlowIntensity.none;
}
}
@override
void write(BinaryWriter writer, FlowIntensity obj) {
switch (obj) {
case FlowIntensity.none:
writer.writeByte(4);
break;
case FlowIntensity.spotting:
writer.writeByte(0);
break;