ListTile constructor Null safety
- {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,
- EdgeInsetsGeometry? contentPadding,
- bool enabled = true,
- GestureTapCallback? onTap,
- GestureLongPressCallback? onLongPress,
- MouseCursor? mouseCursor,
- bool selected = false,
- Color? focusColor,
- Color? hoverColor,
- FocusNode? focusNode,
- bool autofocus = false,
- Color? tileColor,
- Color? selectedTileColor,
- bool? enableFeedback,
- double? horizontalTitleGap,
- double? minVerticalPadding,
- double? minLeadingWidth}
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.contentPadding,
this.enabled = true,
this.onTap,
this.onLongPress,
this.mouseCursor,
this.selected = false,
this.focusColor,
this.hoverColor,
this.focusNode,
this.autofocus = false,
this.tileColor,
this.selectedTileColor,
this.enableFeedback,
this.horizontalTitleGap,
this.minVerticalPadding,
this.minLeadingWidth,
}) : assert(isThreeLine != null),
assert(enabled != null),
assert(selected != null),
assert(autofocus != null),
assert(!isThreeLine || subtitle != null);