find method

List<Element> find(
  1. Finder finder
)

Applies finder to the current tree, returning every match as a list. Throws if pumpWidget hasn't been called yet.

Implementation

List<Element> find(Finder finder) {
  _assertNotDisposed('find');
  final root = _root;
  if (root == null) {
    throw StateError(
      'FleuryTester.find called before pumpWidget; the tree is empty.',
    );
  }
  return finder.apply(root).toList(growable: false);
}