loadRunnable method

Future<VMRunnableIsolate> loadRunnable ()

Loads the full representation of this isolate once it becomes runnable.

This will work whether this isolate is already runnable or has yet to become runnable.

This is only supported on the VM service protocol version 3.0 and greater.

Implementation

Future<VMRunnableIsolate> loadRunnable() {
  return _scope.getInState(_scope.streams.isolate, () async {
    var isolate = await load();
    return isolate is VMRunnableIsolate ? isolate : null;
  }, (json) async {
    if (json["kind"] != "IsolateRunnable") return null;
    return (await load()) as VMRunnableIsolate;
  });
}