scrollIntoViewByKey method

Future<Response> scrollIntoViewByKey(
  1. String keyValue, {
  2. double alignment = 0.0,
})

Implementation

Future<Response> scrollIntoViewByKey(String keyValue,
    {double alignment = 0.0}) async {
  VM vm = await vmService.getVM();
  IsolateRef? mainIsolate = vm.isolates!.first;

  return await vmService.callServiceExtension(
    'ext.flutter.driver',
    isolateId: mainIsolate.id!,
    args: {
      'command': 'scrollIntoView',
      'finderType': 'ByValueKey',
      'keyValueString': keyValue,
      'keyValueType': 'String',
      'alignment': alignment.toString(),
    },
  );
}