run method
override
Runs this command.
The return value is wrapped in a Future
if necessary and returned by
CommandRunner.runCommand.
Implementation
@override
Future<int> run() async {
final app = AppCLI();
if (argResults?['backup'].toString() == 'true') {
await app.runBackup();
} else if (argResults?['backup-db'].toString() == 'true') {
app.runBackupDB();
} else if (argResults?['cleaner'].toString() == 'true') {
app.runCleaner();
} else {
printUsage();
}
return ExitCode.success.code;
}