getOrCreateNode method

  1. @override
LocalNode getOrCreateNode(
  1. String path, [
  2. bool addToTree = true,
  3. bool init = true
])
override

Gets a node at the given path if it exists. If it does not exist, create a new node and return it.

When addToTree is false, the node will not be inserted into the node provider. When init is false, onCreated() is not called.

Implementation

@override
LocalNode getOrCreateNode(
  String path, [
  bool addToTree = true,
  bool init = true,
]) => getNode(path)!;