runCleanInteractive function
Interactive clean: choose project clean only or also cache clean.
Implementation
Future<void> runCleanInteractive() async {
if (!FlutterProjectDetector.hasPubspec) {
ConsoleLog.error('No pubspec.yaml found. Run from project root.');
return;
}
final options = [
'Flutter clean only (build/ and .dart_tool/)',
'Flutter clean + Dart pub cache clean',
];
final choice = Select(
prompt: 'What do you want to clean?',
options: options,
).interact();
await runClean(cleanCache: choice == 1);
}