(context: vs.ExtensionContext)
| 3 | import { dartCodeExtensionIdentifier } from "./constants"; |
| 4 | |
| 5 | export async function activate(context: vs.ExtensionContext): Promise<void> { |
| 6 | // Ensure we have a Dart extension. |
| 7 | const dartExt = vs.extensions.getExtension(dartCodeExtensionIdentifier); |
| 8 | if (!dartExt) { |
| 9 | // This should not happen since the Flutter extension has a dependency on the Dart one |
| 10 | // but just in case, we'd like to give a useful error message. |
| 11 | throw new Error("The Dart extension is not installed, Flutter extension is unable to activate."); |
| 12 | } |
| 13 | await dartExt.activate(); |
| 14 | |
| 15 | if (!dartExt.exports) { |
| 16 | console.error("The Dart extension did not provide an exported API. Maybe it failed to activate or is not the latest version?"); |
| 17 | return; |
| 18 | } |
| 19 | |
| 20 | // Register SDK commands. |
| 21 | const sdkCommands = new SdkCommands(context, dartExt.exports); |
| 22 | } |
nothing calls this directly
no outgoing calls
no test coverage detected