fix static method
Implementation
static Future<void> fix([List<String>? paths, bool dryRun = false]) async {
final dryRunFlag = dryRun ? '--dry-run' : '--apply';
if (paths == null || paths.isEmpty) {
return execute(['${FlutterHelper.getCommandDart()} fix $dryRunFlag']);
} else {
for (var element in paths) {
final isFile = File(element).existsSync();
if (isFile) {
await '${FlutterHelper.getCommandDart()} fix $dryRunFlag $element'
.start(
workingDirectory: '.',
);
} else {
await '${FlutterHelper.getCommandDart()} fix $dryRunFlag'.start(
workingDirectory: element,
);
}
}
}
}