feat:增加TDesign组件库
This commit is contained in:
@@ -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}';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user