selected property Null safety

bool selected
final

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.

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.
To create a local project with this code sample, run:
flutter create --sample=material.ListTile.selected.1 mysample

Implementation

final bool selected;