run method
Runs this command.
The return value is wrapped in a Future
if necessary and returned by
CommandRunner.runCommand
.
Implementation
@override
FutureOr<int>? run() {
/// check if the user has provided a device id with the -d option
if (globalResults!.wasParsed(deviceIdOption)) {
final deviceId = globalResults!.stringArg(deviceIdOption)!;
return _deleteDeviceWithId(deviceId);
}
/// if the user didn't provide a device id, then we will show an interactive
/// prompt to select a device to delete
return _interactiveDeleteDevice();
}