ListTile constructor
const
ListTile({
- Key? key,
- ButtonState<
Color> ? tileColor, - ShapeBorder shape = kDefaultListTileShape,
- Widget? leading,
- Widget? title,
- Widget? subtitle,
- Widget? trailing,
- VoidCallback? onPressed,
- FocusNode? focusNode,
- bool autofocus = false,
- String? semanticLabel,
- MouseCursor? cursor,
- CrossAxisAlignment contentAlignment = CrossAxisAlignment.center,
- 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;