findTextsInMiddle static method

String? findTextsInMiddle(
  1. Element element,
  2. int layoutIndex
)

Implementation

static String? findTextsInMiddle(Element element, int layoutIndex) {
  String? text;
  int index = 0;
  walkElement(element, ((child, _) {
    if (child.widget is LayoutId) {
      if (index == layoutIndex) {
        text = findTexts(child).join('');
        return false;
      }
      index += 1;
    }
    return true;
  }));
  return text;
}