iconTheme property
override
The theme to merge with the default icon theme for NavigationDestination icons.
You can use this to specify a different icon theme when the icon is selected.
Implementation
@override
WidgetStateProperty<IconThemeData?>? get iconTheme {
return WidgetStateProperty.resolveWith((Set<WidgetState> states) {
return IconThemeData(
size: 24.0,
color: states.contains(WidgetState.selected)
? null
: _colors.onSurfaceVariant,
);
});
}