findByLabel method

List<UiElement> findByLabel(
  1. String query
)

Find elements by label (case-insensitive partial match).

Implementation

List<UiElement> findByLabel(String query) {
  final lower = query.toLowerCase();
  return elements
      .where((e) => e.label.toLowerCase().contains(lower))
      .toList();
}