Prevent crashes on range errors when selecting device (#129290)

Prevent the cli from crashing when a user selects a number that is not valid for `flutter run` device selection

Fixes issue:
- https://github.com/flutter/flutter/issues/129191

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
https://dart.googlesource.com/external/github.com/flutter/flutter/+/18b94b7f570fc6381a6712e807f5c98fbad378c9
1 file changed
tree: 39a9624cc0d9f80c3c1037ba9d11eb6d230b6472
  1. commits.json