throwToolExit('Could not parse -t/--timeout argument. It must be an integer.');
}
...
...
@@ -50,7 +47,7 @@ class DevicesCommand extends FlutterCommand {
@override
Future<void>validateCommand(){
if(argResults['timeout']!=null){
if(argResults?['timeout']!=null){
globals.printError('${globals.logger.terminal.warningMark} The "--timeout" argument is deprecated; use "--${FlutterOptions.kDeviceTimeout}" instead.');
}
returnsuper.validateCommand();
...
...
@@ -58,14 +55,14 @@ class DevicesCommand extends FlutterCommand {
@override
Future<FlutterCommandResult>runCommand()async{
if(!globals.doctor.canListAnything){
if(globals.doctor?.canListAnything!=true){
throwToolExit(
"Unable to locate a development device; please run 'flutter doctor' for "
'information about installing additional components.',