()
| 160 | } |
| 161 | |
| 162 | private async flutterUpgrade() { |
| 163 | if (!this.workspace.sdks.flutter) { |
| 164 | this.sdkUtils.showFlutterActivationFailure("flutter.upgrade"); |
| 165 | return; |
| 166 | } |
| 167 | const tempDir = path.join(os.tmpdir(), "dart-code-cmd-run"); |
| 168 | if (!fs.existsSync(tempDir)) |
| 169 | fs.mkdirSync(tempDir); |
| 170 | // Don't prompt to reload when the version changes, as we automatically reload here. |
| 171 | commandState.promptToReloadOnVersionChanges = false; |
| 172 | await this.runFlutterInFolder(tempDir, ["upgrade"], "flutter", true); |
| 173 | await util.promptToReloadExtension(this.logger, { restartReason: ExtensionRestartReason.AfterFlutterUpgrade }); |
| 174 | } |
| 175 | |
| 176 | private async flutterCreate({ packageName, packagePath, triggerData, platform }: FlutterCreateCommandArgs) { |
| 177 | if (!packagePath) { |
nothing calls this directly
no test coverage detected