MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / isSupported

Method isSupported

src/shared/vscode/device_manager.ts:73–77  ·  view source on GitHub ↗
(types: f.PlatformType[] | undefined, device: { platformType?: f.PlatformType | null | undefined } | undefined)

Source from the content-addressed store, hash-verified

71 }
72
73 public isSupported(types: f.PlatformType[] | undefined, device: { platformType?: f.PlatformType | null | undefined } | undefined) {
74 // types being `undefined` means we shouldn't filter, but being empty means we legit
75 // don't support any types.
76 return device && (!types || !device.platformType || types.includes(device.platformType));
77 }
78
79 public isDevicePreferred(device: f.Device | undefined): boolean {
80 const isPreferred = this.config.flutterRememberSelectedDevice

Callers 6

deviceAddedMethod · 0.95
deviceRemovedMethod · 0.95
getPickableDevicesMethod · 0.95
updateStatusBarMethod · 0.95
getPickableEmulatorsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected