select method

List<NodeV3> select(
  1. int selectionStart,
  2. int selectionEnd
)

Implementation

List<NodeV3> select(int selectionStart, int selectionEnd) {
  if (hasPlaintextSelectionMatch(selectionStart, selectionEnd)) {
    return [this];
  }

  List<NodeV3> result = [];

  for (var child in children) {
    result.addAll(child.select(selectionStart, selectionEnd));
  }

  return result;
}