sectionStartIndex method

int sectionStartIndex(
  1. T targetSection
)

Implementation

int sectionStartIndex(T targetSection) {
  var currSectionBeginIndex = 0;
  for (final section in arr) {
    if (section == targetSection) return currSectionBeginIndex;
    currSectionBeginIndex += getCount(section);
  }
  throw Exception(
      'sectionStartIndex fail to find targetSection=$targetSection');
}