mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
tidy: settings page
This commit is contained in:
@@ -11,6 +11,38 @@ enum PlatformType {
|
||||
web,
|
||||
fuchsia,
|
||||
unknown;
|
||||
|
||||
String get prettyName {
|
||||
switch (this) {
|
||||
case PlatformType.android:
|
||||
return 'Android';
|
||||
case PlatformType.ios:
|
||||
return 'iOS';
|
||||
case PlatformType.linux:
|
||||
return 'Linux';
|
||||
case PlatformType.macos:
|
||||
return 'macOS';
|
||||
case PlatformType.windows:
|
||||
return 'Windows';
|
||||
case PlatformType.web:
|
||||
return 'Web';
|
||||
case PlatformType.fuchsia:
|
||||
return 'Fuchsia';
|
||||
case PlatformType.unknown:
|
||||
return 'Unknown';
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether has platform specific settings.
|
||||
bool get hasSettings {
|
||||
switch (this) {
|
||||
case PlatformType.android:
|
||||
case PlatformType.ios:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final _p = () {
|
||||
|
||||
Reference in New Issue
Block a user