ListTile constructor

const ListTile({
  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. String? semanticLabel,
  12. MouseCursor? cursor,
  13. CrossAxisAlignment contentAlignment = CrossAxisAlignment.center,
  14. EdgeInsetsGeometry contentPadding = kDefaultListTilePadding,
})

A fluent-styled list tile

Implementation

const ListTile({
  super.key,
  this.tileColor,
  this.shape = kDefaultListTileShape,
  this.leading,
  this.title,
  this.subtitle,
  this.trailing,
  this.onPressed,
  this.focusNode,
  this.autofocus = false,
  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',
      ),
      selected = false,
      selectionMode = ListTileSelectionMode.none,
      onSelectionChange = null;