onDestinationSelected property Null safety
final
Called when one of the destinations is selected.
The stateful widget that creates the navigation rail needs to keep
track of the index of the selected NavigationRailDestination and call
setState
to rebuild the navigation rail with the new selectedIndex.
Implementation
final ValueChanged<int>? onDestinationSelected;