run method
Runs this command.
The return value is wrapped in a Future
if necessary and returned by
CommandRunner.runCommand
.
Implementation
@override
Future<void> run() async {
final cliHandler = CliHandler();
cliHandler.printBoltCyanText('Generating debug SHA keys');
print('\n');
final osChoice = ['windows', 'linux', 'mac'];
final osChoiceSelector = ChoiceSelector(osChoice);
cliHandler.printBoltCyanText('Choose your operating system : ');
osChoiceSelector.printOptions();
osChoiceSelector.handleArrowKeys();
int osChoiceIndex = osChoiceSelector.selectedIndexForOptions;
// windows
if (osChoiceIndex == 0) {
await SHAHandler.generateWindowsSHA();
}
// linux
else if (osChoiceIndex == 1) {
await SHAHandler.generateLinuxSHA();
}
// mac
else if (osChoiceIndex == 2) {
await SHAHandler.generateMacSHA();
}
}