onChanged property
Called when the current index should be changed. If null, the bottom navigation items are considered disabled.
{@toolSnippet}
int index = 0;
BottomNavigation(
index: index,
onChanged: (i) => setState(() => index = i),
)
{@endtool}
Implementation
final ValueChanged<int>? onChanged;