Refine: Add real-time countdown timer and display settings to Pad Tracker

This commit is contained in:
2026-01-02 18:17:23 -06:00
parent 8772b56f36
commit f54222d26a
4 changed files with 107 additions and 10 deletions

View File

@@ -103,13 +103,15 @@ class UserProfileAdapter extends TypeAdapter<UserProfile> {
notifyLowSupply: fields[37] == null ? true : fields[37] as bool,
lastPadChangeTime: fields[7] as DateTime?,
padSupplies: (fields[38] as List?)?.cast<SupplyItem>(),
showPadTimerMinutes: fields[39] == null ? true : fields[39] as bool,
showPadTimerSeconds: fields[40] == null ? false : fields[40] as bool,
);
}
@override
void write(BinaryWriter writer, UserProfile obj) {
writer
..writeByte(38)
..writeByte(40)
..writeByte(0)
..write(obj.id)
..writeByte(1)
@@ -185,7 +187,11 @@ class UserProfileAdapter extends TypeAdapter<UserProfile> {
..writeByte(36)
..write(obj.notifyPeriodStart)
..writeByte(37)
..write(obj.notifyLowSupply);
..write(obj.notifyLowSupply)
..writeByte(39)
..write(obj.showPadTimerMinutes)
..writeByte(40)
..write(obj.showPadTimerSeconds);
}
@override