onNotify method

  1. @override
void onNotify([
  1. int index = 0
])
override

Implementation

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