feat:统计页面
This commit is contained in:
1 parent
3c5ba3ae8a
commit
ab9ea614d5
9 files changed
+187
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import 'package:forui/forui.dart';
|
||||
import 'package:pj_supermarket_cloud/common/index.dart';
|
||||
|
||||
/// 设备类型
|
||||
@@ -109,6 +110,20 @@ enum ProductHourType implements BaseEnum {
|
||||
@override
|
||||
final String title;
|
||||
|
||||
// 使用 getter 方法动态获取图标
|
||||
SvgAsset get icon {
|
||||
switch (this) {
|
||||
case ProductHourType.TOTAL:
|
||||
return FAssets.icons.calendar;
|
||||
case ProductHourType.MORNING:
|
||||
return FAssets.icons.sunrise;
|
||||
case ProductHourType.NOON:
|
||||
return FAssets.icons.sun;
|
||||
case ProductHourType.NIGHT:
|
||||
return FAssets.icons.sunMoon;
|
||||
}
|
||||
}
|
||||
|
||||
const ProductHourType(this.code, this.title);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user