ListTile constructor
- Key? key,
- Widget? leading,
- Widget? title,
- Widget? subtitle,
- Widget? trailing,
- bool isThreeLine = false,
- bool? dense,
- VisualDensity? visualDensity,
- ShapeBorder? shape,
- ListTileStyle? style,
- Color? selectedColor,
- Color? iconColor,
- Color? textColor,
- TextStyle? titleTextStyle,
- TextStyle? subtitleTextStyle,
- TextStyle? leadingAndTrailingTextStyle,
- EdgeInsetsGeometry? contentPadding,
- bool enabled = true,
- GestureTapCallback? onTap,
- GestureLongPressCallback? onLongPress,
- ValueChanged<
bool> ? onFocusChange, - MouseCursor? mouseCursor,
- bool selected = false,
- Color? focusColor,
- Color? hoverColor,
- Color? splashColor,
- FocusNode? focusNode,
- bool autofocus = false,
- Color? tileColor,
- Color? selectedTileColor,
- bool? enableFeedback,
- double? horizontalTitleGap,
- double? minVerticalPadding,
- double? minLeadingWidth,
- double? minTileHeight,
- ListTileTitleAlignment? titleAlignment,
Creates a list tile.
If isThreeLine is true, then subtitle must not be null.
Requires one of its ancestors to be a Material widget.
Implementation
const ListTile({
super.key,
this.leading,
this.title,
this.subtitle,
this.trailing,
this.isThreeLine = false,
this.dense,
this.visualDensity,
this.shape,
this.style,
this.selectedColor,
this.iconColor,
this.textColor,
this.titleTextStyle,
this.subtitleTextStyle,
this.leadingAndTrailingTextStyle,
this.contentPadding,
this.enabled = true,
this.onTap,
this.onLongPress,
this.onFocusChange,
this.mouseCursor,
this.selected = false,
this.focusColor,
this.hoverColor,
this.splashColor,
this.focusNode,
this.autofocus = false,
this.tileColor,
this.selectedTileColor,
this.enableFeedback,
this.horizontalTitleGap,
this.minVerticalPadding,
this.minLeadingWidth,
this.minTileHeight,
this.titleAlignment,
}) : assert(!isThreeLine || subtitle != null);