ListTile.selectable constructor

const ListTile.selectable({
  1. Key? key,
  2. ButtonState<Color>? tileColor,
  3. ShapeBorder shape = kDefaultListTileShape,
  4. Widget? leading,
  5. Widget? title,
  6. Widget? subtitle,
  7. Widget? trailing,
  8. VoidCallback? onPressed,
  9. FocusNode? focusNode,
  10. bool autofocus = false,
  11. bool selected = false,
  12. ListTileSelectionMode selectionMode = ListTileSelectionMode.single,
  13. ValueChanged<bool>? onSelectionChange,
  14. String? semanticLabel,
  15. MouseCursor? cursor,
  16. CrossAxisAlignment contentAlignment = CrossAxisAlignment.center,
  17. EdgeInsetsGeometry contentPadding = kDefaultListTilePadding,
})

A selectable list tile.

Implementation

const ListTile.selectable({
  super.key,
  this.tileColor,
  this.shape = kDefaultListTileShape,
  this.leading,
  this.title,
  this.subtitle,
  this.trailing,
  this.onPressed,
  this.focusNode,
  this.autofocus = false,
  this.selected = false,
  this.selectionMode = ListTileSelectionMode.single,
  this.onSelectionChange,
  this.semanticLabel,
  this.cursor,
  this.contentAlignment = CrossAxisAlignment.center,
  this.contentPadding = kDefaultListTilePadding,
}) : assert(
        subtitle != null ? title != null : true,
        'To have a subtitle, there must be a title',
      );