1. @override
LocalNode getNode(String path, { Completer<CallbackNode> onLoaded, bool forceHandle: false })

Gets an existing node.

Source

@override
LocalNode getNode(String path, {Completer<CallbackNode> onLoaded, bool forceHandle: false}) {
  LocalNode node = super.getNode(path);
  if (path != "/" && node != null && !forceHandle) {
    if (onLoaded != null && !onLoaded.isCompleted) {
      onLoaded.complete(node);
    }
    return node;
  }

  if (handler == null) {
    if (onLoaded != null && !onLoaded.isCompleted) {
      onLoaded.complete(null);
    }
    return null;
  }

  Completer c = new Completer();
  CallbackNode n = new CallbackNode(path, provider: this);
  n.onLoadedCompleter = c;
  bool isListReady = false;
  n.isListReady = () => isListReady;
  handler(n).then((m) {
    if (!m) {
      isListReady = true;
      String ts = ValueUpdate.getTs();
      n.getDisconnectedStatus = () => ts;
      n.listChangeController.add(r"$is");

      if (onLoaded != null && !onLoaded.isCompleted) {
        onLoaded.complete(n);
      }

      if (c != null && !c.isCompleted) {
        c.complete();
      }

      return;
    }
    isListReady = true;
    n.listChangeController.add(r"$is");
    if (onLoaded != null && !onLoaded.isCompleted) {
      onLoaded.complete(n);
    }

    if (c != null && !c.isCompleted) {
      c.complete();
    }
  }).catchError((e, stack) {
    isListReady = true;
    String ts = ValueUpdate.getTs();
    n.getDisconnectedStatus = () => ts;
    n.listChangeController.add(r"$is");

    if (c != null && !c.isCompleted) {
      c.completeError(e, stack);
    }
  });
  return n;
}