| Line | Branch | Hits | Source code |
|---|---|---|---|
| 1 | enum SquadronPlatformType { |
||
| 2 | unknown('Unknown'), |
||
| 3 | vm('Dart VM'), |
||
| 4 | js('JavaScript'), |
||
| 5 | wasm('Web Assembly'); |
||
| 6 | |
||
| 7 | const SquadronPlatformType(this.label); |
||
| 8 | |
||
| 9 | final String label; |
||
| 10 | |
||
| 11 | 2 | bool get isVm => this == vm; |
|
| 12 | 2 | bool get isJs => this == js; |
|
| 13 | 2 | bool get isWasm => this == wasm; |
|
| 14 | 3 | bool get isWeb => isJs || isWasm; |
|
| 15 | |
||
| 16 | 1 | static SquadronPlatformType? tryParse(String label) { |
|
| 17 | 2 | if (label == js.label) return js; |
|
| 18 | 2 | if (label == wasm.label) return wasm; |
|
| 19 | 2 | if (label == vm.label) return vm; |
|
| 20 | 0 | if (label == unknown.label) return unknown; |
|
| 21 | return null; |
||
| 22 | } |
||
| 23 | |
||
| 24 | 1 | @override |
|
| 25 | 1 | String toString() => label; |
|
| 26 | } |
||
| 27 | |
||
| 28 | enum SquadronOSType { |
||
| 29 | unknown, |
||
| 30 | windows, |
||
| 31 | linux, |
||
| 32 | fuchsia, |
||
| 33 | macos, |
||
| 34 | android, |
||
| 35 | ios, |
||
| 36 | web |
||
| 37 | } |