(options?: { commandSource?: string })
| 302 | } |
| 303 | |
| 304 | private async createFlutterProject(options?: { commandSource?: string }): Promise<vs.Uri | undefined> { |
| 305 | if (!this.sdks?.flutter) { |
| 306 | this.sdkUtils.showFlutterActivationFailure("flutter.createProject"); |
| 307 | return; |
| 308 | } |
| 309 | |
| 310 | this.analytics.logFlutterNewProject(options?.commandSource); |
| 311 | |
| 312 | const pickItems = this.getFlutterTemplates(); |
| 313 | |
| 314 | const selectedTemplate = await vs.window.showQuickPick( |
| 315 | pickItems, |
| 316 | { |
| 317 | ignoreFocusOut: true, |
| 318 | matchOnDescription: true, |
| 319 | placeHolder: "Which Flutter template?", |
| 320 | }, |
| 321 | ); |
| 322 | |
| 323 | if (!selectedTemplate?.template) |
| 324 | return; |
| 325 | |
| 326 | return this.createFlutterProjectForTemplate(selectedTemplate.template); |
| 327 | } |
| 328 | |
| 329 | private async createFlutterProjectForTemplate(template: FlutterProjectTemplate): Promise<vs.Uri | undefined> { |
| 330 | if (!this.sdks?.flutter) { |
no test coverage detected