基本完成
This commit is contained in:
8
lib/data/models/other_login_type.dart
Normal file
8
lib/data/models/other_login_type.dart
Normal file
@@ -0,0 +1,8 @@
|
||||
enum OtherLoginType {
|
||||
google('google'),
|
||||
apple('apple');
|
||||
|
||||
const OtherLoginType(this.value);
|
||||
|
||||
final String value;
|
||||
}
|
||||
22
lib/data/models/skin_check_status.dart
Normal file
22
lib/data/models/skin_check_status.dart
Normal file
@@ -0,0 +1,22 @@
|
||||
enum SkinCheckStatus {
|
||||
/// 正常
|
||||
normal(1),
|
||||
|
||||
/// 警告
|
||||
warning(2),
|
||||
|
||||
/// 危险
|
||||
danger(3),
|
||||
|
||||
/// 未知
|
||||
unknown(0);
|
||||
|
||||
final int value;
|
||||
|
||||
const SkinCheckStatus(this.value);
|
||||
|
||||
/// 根据 int 值返回对应的枚举,默认返回 online
|
||||
static SkinCheckStatus fromValue(int value) {
|
||||
return SkinCheckStatus.values.firstWhere((e) => e.value == value, orElse: () => SkinCheckStatus.unknown);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user