Files
MWClash/lib/enum/enum.dart

88 lines
1.7 KiB
Dart
Raw Normal View History

2024-04-30 23:38:49 +08:00
// ignore_for_file: constant_identifier_names
enum GroupType { Selector, URLTest, Fallback, LoadBalance, Relay }
2024-04-30 23:38:49 +08:00
2024-05-07 13:50:00 +08:00
enum GroupName { GLOBAL, Proxy, Auto, Fallback }
2024-04-30 23:38:49 +08:00
extension GroupTypeExtension on GroupType {
static List<String> get valueList => GroupType.values
.map(
(e) => e.toString().split(".").last,
)
.toList();
2024-05-03 14:31:10 +08:00
static GroupType? getGroupType(String value) {
2024-04-30 23:38:49 +08:00
final index = GroupTypeExtension.valueList.indexOf(value);
if (index == -1) return null;
return GroupType.values[index];
}
String get value => GroupTypeExtension.valueList[index];
}
enum UsedProxy { GLOBAL, DIRECT, REJECT }
extension UsedProxyExtension on UsedProxy {
static List<String> get valueList => UsedProxy.values
.map(
(e) => e.toString().split(".").last,
)
.toList();
String get value => UsedProxyExtension.valueList[index];
}
enum Mode { rule, global, direct }
enum ViewMode { mobile, laptop, desktop }
2024-04-30 23:38:49 +08:00
enum LogLevel { debug, info, warning, error, silent }
enum TransportProtocol { udp, tcp }
enum TrafficUnit { B, KB, MB, GB, TB }
enum NavigationItemMode { mobile, desktop, more }
enum Network { tcp, udp }
enum ProxiesSortType { none, delay, name }
enum TunStack { gvisor, system, mixed }
enum AccessControlMode { acceptSelected, rejectSelected }
enum ProfileType { file, url }
enum ResultType { success, error }
2024-07-13 16:36:08 +08:00
enum AppMessageType {
log,
delay,
request,
2024-07-13 16:36:08 +08:00
started,
loaded,
}
enum ServiceMessageType {
protect,
process,
started,
loaded,
}
enum FindProcessMode { always, off }
enum RecoveryOption {
all,
onlyProfiles,
}
enum ChipType { action, delete }
enum CommonCardType { plain, filled }
enum ProxiesType { tab, list }
enum ProxyCardType { expand, shrink, min }