onPositionChange method
Implementation
onPositionChange([Function(int)? stream]) {
_selectedIndex.stream.listen((int index) {
_currentIndex = index;
if (stream != null) {
stream(_currentIndex);
}
});
}
onPositionChange([Function(int)? stream]) {
_selectedIndex.stream.listen((int index) {
_currentIndex = index;
if (stream != null) {
stream(_currentIndex);
}
});
}