cleanBuildCache method
Implementation
@override
Future<void> cleanBuildCache(String projectName) async {
try {
// Run flutter clean to clear build cache
final result = await Process.run(
'flutter',
['clean'],
workingDirectory: projectName,
);
if (result.exitCode == 0) {
// Run flutter pub get to restore dependencies
await Process.run(
'flutter',
['pub', 'get'],
workingDirectory: projectName,
);
}
} catch (e) {
print('Warning: Failed to clean build cache: $e');
}
}