getNodeById method

Node? getNodeById(
  1. String id
)

Implementation

Node? getNodeById(String id) {
  if (_body.id == id) return _body;
  return _body.descendants
      .whereType<Node>()
      .where((n) => n.id == id)
      .firstOrNull;
}