child static method

Future<Nvim> child({
  1. NvimHandler? onNotify,
  2. NvimHandler? onRequest,
})

Implementation

static Future<Nvim> child(
    {NvimHandler? onNotify, NvimHandler? onRequest}) async {
  var nvim = Nvim._child();
  if (onRequest != null) {
    nvim.onRequest = onRequest;
  }
  if (onNotify != null) {
    nvim.onNotify = onNotify;
  }

  // TODO(smolck): Use isolates for this too like with `Nvim.spawn`?
  stdin.listen((data) => _listener(nvim, data));

  return nvim;
}