getTitleIndexWithWidgetIndex method
get the index of MTitle
Implementation
int getTitleIndexWithWidgetIndex(int index) {
final tocList = _tocList?.values.toList();
if (tocList == null || tocList.isEmpty) return 0;
if (tocList.length <= index) return tocList.length - 1;
return tocList[index].index;
}