feat:增加TDesign组件库

This commit is contained in:
2026-01-05 15:33:43 +08:00
parent 2b334edf2f
commit 00c8e82a65
18 changed files with 364 additions and 304 deletions

View File

@@ -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();
}
}