getLayer method

Layer? getLayer(
  1. String lookupId
)

Returns the first layer with lookupId, searching descendants.

Implementation

Layer? getLayer(String lookupId) {
  if (lookupId.isEmpty) return null;
  if (id == lookupId) return this;
  for (final child in _layers) {
    final found = child.getLayer(lookupId);
    if (found != null) return found;
  }
  return null;
}