app_enums.dart
1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
enum PulseType {
fu(1),
chen(2),
chi(3),
shu(4),
hua(5),
se(6),
xu(7),
ping(8);
const PulseType(this.value);
final int value;
static PulseType? fromValue(int value) =>
PulseType.values.where((e) => e.value == value).firstOrNull;
}
enum HealthDataUploadType {
hrv(1),
heartRate(2),
spo2(3),
move(4),
exercise(5),
stand(6),
steps(7),
walkingHeartRate(8),
restingHeartRate(9),
sleepingHeartRate(10),
wristTemperature(11),
respiratoryRate(12),
irregularHeartRhythm(13);
const HealthDataUploadType(this.type);
final int type;
}
enum HrvStatus {
energetic('活力满满'),
normal('状态正常'),
overload('压力过载');
const HrvStatus(this.title);
final String title;
}
enum UserCharacter {
cat(1, '小猫咖喱'),
dog(2, '小狗白白');
const UserCharacter(this.id, this.nickname);
final int id;
final String nickname;
static UserCharacter? fromId(int? id) =>
UserCharacter.values.where((e) => e.id == id).firstOrNull;
}