selected property
If this tile is also enabled
then icons and text are rendered with the
same color.
By default the selected color is the theme's primary color. The selected color can be overridden with a ListTileTheme.
{@tool dartpad}
Here is an example of using a StatefulWidget to keep track of the
selected index, and using that to set the selected
property on the
corresponding ListTile.
** See code in examples/api/lib/material/list_tile/list_tile.selected.0.dart ** {@end-tool}
Implementation
final bool selected;