feat:增加TDesign组件库
This commit is contained in:
@@ -43,10 +43,10 @@ class HealthService {
|
||||
}
|
||||
|
||||
// 获取总运动时长
|
||||
num getTotalSport() {
|
||||
double getTotalSport() {
|
||||
int year = DateTime.now().year;
|
||||
int month = DateTime.now().month;
|
||||
num totalDuration = 0;
|
||||
double totalDuration = 0;
|
||||
|
||||
for (final record in getAllRecords()) {
|
||||
if (record.sportDuration != 0) {
|
||||
@@ -88,12 +88,12 @@ class HealthService {
|
||||
}
|
||||
|
||||
// 获取最新体重
|
||||
num getLatestWeight() {
|
||||
double getLatestWeight() {
|
||||
final records = getAllRecordsOrderByDate();
|
||||
|
||||
for (final record in records) {
|
||||
if (record.weight != 0) {
|
||||
return record.weight;
|
||||
return record.weight.toDouble();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user