ToneSnap_FSX_Flutter/lib/data/enum/app_side_enum.dart

24 lines
434 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Author: fengshengxiong
// Date: 2024/6/13
// Description: App类型A/B
enum AppSideEnum {
sideA(type: 0),
sideB(type: 1);
const AppSideEnum({
required this.type,
});
final int type;
}
extension AppSideEnumExtension on AppSideEnum {
static AppSideEnum getEnum(int? type) {
if (type == AppSideEnum.sideA.type) {
return AppSideEnum.sideA;
} else {
return AppSideEnum.sideB;
}
}
}