onNotify method
Implementation
@override
void onNotify([int index = 0]) {
if (currentIndex != index) {
super.onNotifyWithCallback(() {
currentIndex = index;
if (onIndexChanged != null) onIndexChanged?.call(currentIndex);
});
}
}