findTabIndexByTitle static method

int? findTabIndexByTitle(
  1. List<SolidNavTab> tabs,
  2. String title
)

Finds a tab by title (case-insensitive).

Implementation

static int? findTabIndexByTitle(List<SolidNavTab> tabs, String title) {
  for (int i = 0; i < tabs.length; i++) {
    if (tabs[i].title.toLowerCase() == title.toLowerCase()) {
      return i;
    }
  }
  return null;
}