feat:增加睡眠记录

This commit is contained in:
2025-12-02 14:09:56 +08:00
parent 2cc69b4019
commit 8a71ea542e
14 changed files with 402 additions and 129 deletions

View File

@@ -23,7 +23,6 @@ class HealthRecordAdapter extends TypeAdapter<HealthRecord> {
weight: fields[3] as num,
sleepStartTime: fields[4] as String,
sleepEndTime: fields[5] as String,
sleepDuration: fields[6] as num,
date: fields[7] as String,
);
}
@@ -31,7 +30,7 @@ class HealthRecordAdapter extends TypeAdapter<HealthRecord> {
@override
void write(BinaryWriter writer, HealthRecord obj) {
writer
..writeByte(8)
..writeByte(7)
..writeByte(0)
..write(obj.id)
..writeByte(1)
@@ -44,8 +43,6 @@ class HealthRecordAdapter extends TypeAdapter<HealthRecord> {
..write(obj.sleepStartTime)
..writeByte(5)
..write(obj.sleepEndTime)
..writeByte(6)
..write(obj.sleepDuration)
..writeByte(7)
..write(obj.date);
}