Remove the rest of the uses of Number.tryParse() (#16568)
This commit is contained in:
@@ -197,7 +197,8 @@ class FuchsiaRemoteConnection {
|
||||
final int lastSpace = trimmed.lastIndexOf(' ');
|
||||
final String lastWord = trimmed.substring(lastSpace + 1);
|
||||
if ((lastWord != '.') && (lastWord != '..')) {
|
||||
final int value = int.tryParse(lastWord);
|
||||
// ignore: deprecated_member_use
|
||||
final int value = int.parse(lastWord, onError: (_) => null);
|
||||
if (value != null) {
|
||||
ports.add(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user