feat:增加历史记录
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_common/flutter_common.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
|
||||
@@ -38,7 +39,7 @@ class HealthRecord extends HiveObject {
|
||||
required this.date,
|
||||
});
|
||||
|
||||
static HealthRecord getEmpty(String date) {
|
||||
static HealthRecord getEmpty(DateTime date) {
|
||||
return HealthRecord(
|
||||
id: DateTime.now().millisecondsSinceEpoch ~/ 1000,
|
||||
sportProject: '',
|
||||
@@ -46,7 +47,7 @@ class HealthRecord extends HiveObject {
|
||||
weight: 0,
|
||||
sleepStartTime: '',
|
||||
sleepEndTime: '',
|
||||
date: date,
|
||||
date: formatDate(date),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user