findBlockById method

Block? findBlockById(
  1. String blockId
)

Implementation

Block? findBlockById(String blockId) {
  if (id == blockId) return this;
  for (var child in children) {
    final found = child.findBlockById(blockId);
    if (found != null) return found;
  }
  return null;
}