( uri: vs.Uri | vs.Uri[] | undefined, operationProgress?: OperationProgress, )
| 50 | } |
| 51 | |
| 52 | private async flutterClean( |
| 53 | uri: vs.Uri | vs.Uri[] | undefined, |
| 54 | operationProgress?: OperationProgress, |
| 55 | ): Promise<RunProcessResult | undefined> { |
| 56 | // If we don't have a parent progress, add one. |
| 57 | if (!operationProgress) { |
| 58 | return vs.window.withProgress({ |
| 59 | cancellable: true, |
| 60 | location: vs.ProgressLocation.Notification, |
| 61 | title: "flutter clean", |
| 62 | }, (progress, token) => this.flutterClean(uri, { progressReporter: progress, cancellationToken: token })); |
| 63 | } |
| 64 | |
| 65 | // If we are a batch, run for each item. |
| 66 | if (Array.isArray(uri)) { |
| 67 | await runBatchFolderOperation(uri, operationProgress, this.flutterCleanForUri.bind(this)); |
| 68 | return; |
| 69 | } |
| 70 | |
| 71 | if (!uri) { |
| 72 | const path = await getFolderToRunCommandIn(this.logger, `Select the folder to run "flutter clean" in`, { selection: uri, flutterOnly: true }); |
| 73 | if (!path) |
| 74 | return; |
| 75 | uri = vs.Uri.file(path); |
| 76 | } |
| 77 | |
| 78 | return this.flutterCleanForUri(uri, operationProgress); |
| 79 | } |
| 80 | |
| 81 | private async flutterCleanForUri(uri: vs.Uri, operationProgress?: OperationProgress): Promise<RunProcessResult | undefined> { |
| 82 | return this.runFlutter(["clean"], uri, false, operationProgress); |
nothing calls this directly
no test coverage detected