prefer_contains (#8040)
This commit is contained in:
parent
60f5cbbad2
commit
e151a1a438
@ -125,9 +125,9 @@ Future<String> getDartVersion() async {
|
||||
// Dart VM version: 1.17.0-dev.2.0 (Tue May 3 12:14:52 2016) on "macos_x64"
|
||||
// to:
|
||||
// 1.17.0-dev.2.0
|
||||
if (version.indexOf('(') != -1)
|
||||
if (version.contains('('))
|
||||
version = version.substring(0, version.indexOf('(')).trim();
|
||||
if (version.indexOf(':') != -1)
|
||||
if (version.contains(':'))
|
||||
version = version.substring(version.indexOf(':') + 1).trim();
|
||||
|
||||
return version.replaceAll('"', "'");
|
||||
|
@ -127,7 +127,7 @@ class Daemon {
|
||||
|
||||
try {
|
||||
String method = request['method'];
|
||||
if (method.indexOf('.') == -1)
|
||||
if (!method.contains('.'))
|
||||
throw 'method not understood: $method';
|
||||
|
||||
String prefix = method.substring(0, method.indexOf('.'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user