[flutter_driver] rename local functions with _s (#102689)

This commit is contained in:
Phil Quitslund
2022-04-27 16:14:10 -07:00
committed by GitHub
parent 401df0eb6f
commit a03f59cdc4
2 changed files with 27 additions and 27 deletions

View File

@@ -86,22 +86,22 @@ class VMServiceFlutterDriver extends FlutterDriver {
_log('Connecting to Flutter application at $dartVmServiceUrl');
final vms.VmService client = await vmServiceConnectFunction(dartVmServiceUrl, headers);
Future<vms.IsolateRef?> _waitForRootIsolate() async {
bool _checkIsolate(vms.IsolateRef ref) => ref.number == isolateNumber.toString();
Future<vms.IsolateRef?> waitForRootIsolate() async {
bool checkIsolate(vms.IsolateRef ref) => ref.number == isolateNumber.toString();
while (true) {
final vms.VM vm = await client.getVM();
if (vm.isolates!.isEmpty || (isolateNumber != null && !vm.isolates!.any(_checkIsolate))) {
if (vm.isolates!.isEmpty || (isolateNumber != null && !vm.isolates!.any(checkIsolate))) {
await Future<void>.delayed(_kPauseBetweenReconnectAttempts);
continue;
}
return isolateNumber == null
? vm.isolates!.first
: vm.isolates!.firstWhere(_checkIsolate);
: vm.isolates!.firstWhere(checkIsolate);
}
}
final vms.IsolateRef isolateRef = (await _warnIfSlow<vms.IsolateRef?>(
future: _waitForRootIsolate(),
future: waitForRootIsolate(),
timeout: kUnusuallyLongTimeout,
message: isolateNumber == null
? 'The root isolate is taking an unusually long time to start.'