validRoot property

String get validRoot

Get the root with validation (throws if null)

Implementation

String get validRoot {
  if (root == null || root!.isEmpty) {
    throw StateError('Node root is null or empty');
  }
  return root!;
}