onTap method
Implementation
void onTap(int index) {
if (currentIndexNotifier.value == index &&
currentRoutingTypeNotifier.value ==
BartMenuRouteType.bottomNavigation) {
return;
}
if (widget.enableHapticFeedback) {
HapticFeedback.selectionClick();
}
final nestedContext = MenuRouter.of(context).navigationKey.currentContext;
if (nestedContext != null) {
Navigator.of(nestedContext).pushReplacementNamed(routes[index].path);
}
}