execute method
Executes the command using the parsed results.
Implementation
@override
Future<void> execute(ArgResults results) async {
if (results.rest.isEmpty) {
LoggerService.error('Usage: $usage');
return;
}
final config = await ConfigService.load();
final platformArg = results.rest.first;
final flavor = results.rest.length > 1 ? results.rest[1] : config.defaultFlavor;
final platform = BuildPlatform.fromString(platformArg);
LoggerService.info('Platform : $platformArg');
LoggerService.info('Flavor : $flavor');
await BuildService().build(platform: platform, flavor: flavor);
}