mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
fix: SystemType(#184) & opt.: ios home widget
This commit is contained in:
@@ -9,15 +9,16 @@ enum SystemType {
|
||||
|
||||
const SystemType._(this.value);
|
||||
|
||||
static SystemType? parse(String? value) {
|
||||
if (value == null) return null;
|
||||
switch (value) {
|
||||
static SystemType parse(String value) {
|
||||
switch (value.trim()) {
|
||||
case linuxSign:
|
||||
return SystemType.linux;
|
||||
case bsdSign:
|
||||
return SystemType.bsd;
|
||||
default:
|
||||
// Fallback to linux
|
||||
return SystemType.linux;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
bool isSegmentsLenMatch(int len) => len == segmentsLen;
|
||||
|
||||
Reference in New Issue
Block a user