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

@@ -113,7 +113,7 @@ String formatContent(HealthRecord record, RecordType type) {
late String title;
switch (type) {
case RecordType.weight:
title = "${record.weight} ${type.unit}";
title = "${record.weight.toStringAsFixed(1)} ${type.unit}";
case RecordType.sport:
title = "${record.sportProject} · ${record.sportDuration} ${type.unit}";
case RecordType.sleep:
@@ -131,3 +131,10 @@ String formatContent(HealthRecord record, RecordType type) {
return title;
}
String getTimeFromSelectDate(Map<String, int> selected) {
final String hour = selected['hour'].toString().padLeft(2, '0');
final String minute = selected['minute'].toString().padLeft(2, '0');
return '${hour}:${minute}';
}