findTexts static method

List<String> findTexts(
  1. Element element
)

Implementation

static List<String> findTexts(Element element) {
  List<String> list = [];
  walkElement(element, ((child, _) {
    if (child.widget is Text) {
      String? text = (child.widget as Text).data;
      if (text != null) {
        list.add(text);
      }
      return false;
    }
    return true;
  }));
  return list;
}