icon property

Widget icon
final

The icon of the destination.

Typically the icon is an Icon or an ImageIcon widget. If another type of widget is provided then it should configure itself to match the current IconTheme size and color.

If selectedIcon is provided, this will only be displayed when the destination is not selected.

To make the NavigationRail more accessible, consider choosing an icon with a stroked and filled version, such as Icons.cloud and Icons.cloud_queue. The icon should be set to the stroked version and selectedIcon to the filled version.

Implementation

final Widget icon;