layerListOf method

Iterable<Layer> layerListOf(
  1. FinderBase<Element> finder
)

Find all layers that are children of the provided finder.

The finder must match exactly one element.

Implementation

Iterable<Layer> layerListOf(finders.FinderBase<Element> finder) {
  TestAsyncUtils.guardSync();
  final Element element = finder.evaluate().single;
  final RenderObject object = element.renderObject!;
  RenderObject current = object;
  while (current.debugLayer == null) {
    current = current.parent!;
  }
  final ContainerLayer layer = current.debugLayer!;
  return _walkLayers(layer);
}