A single fixed-height row that typically contains some text as well as a leading or trailing icon.

A list tile contains one to three lines of text optionally flanked by icons or other widgets, such as check boxes. The icons (or other widgets) for the tile are defined with the leading and trailing parameters. The first line of text is not optional and is specified with title. The value of subtitle, which is optional, will occupy the space allocated for an additional line of text, or two lines if isThreeLine is true. If dense is true then the overall height of this tile and the size of the DefaultTextStyles that wrap the title and subtitle widget are reduced.

List tiles are always a fixed height (which height depends on how isThreeLine, dense, and subtitle are configured); they do not grow in height based on their contents. If you are looking for a widget that allows for arbitrary layout in a row, consider Row.

List tiles are typically used in ListViews, Drawers, and Cards.

Requires one of its ancestors to be a Material widget.

See also:

Inheritance

Constructors

ListTile({Key key, Widget leading, Widget title, Widget subtitle, Widget trailing, bool isThreeLine: false, bool dense, bool enabled: true, GestureTapCallback onTap, GestureLongPressCallback onLongPress, bool selected: false })

Creates a list tile.

const

Properties

dense bool

Whether this list tile is part of a vertically dense list.

final
enabled bool

Whether this list tile is interactive.

final
isThreeLine bool

Whether this list tile is intended to display three lines of text.

final
leading Widget

A widget to display before the title.

final
onLongPress GestureLongPressCallback

Called when the user long-presses on this list tile.

final
onTap GestureTapCallback

Called when the user taps this list tile.

final
selected bool

If this tile is also enabled then icons and text are rendered with the same color.

final
subtitle Widget

Additional content displayed below the title.

final
title Widget

The primary content of the list tile.

final
trailing Widget

A widget to display after the title.

final
hashCode int

The hash code for this object.

read-only, inherited
key Key

Controls how one widget replaces another widget in the tree.

final, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Methods

build(BuildContext context) Widget

Describes the part of the user interface represented by this widget.

createElement() StatelessElement

Creates a StatelessElement to manage this widget's location in the tree.

inherited
debugFillDescription(List<String> description) → void

Add additional information to the given description for use by toString.

@mustCallSuper, @protected, inherited
noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() String

Returns a string representation of this object.

inherited
toStringShort() String

A short, textual description of this widget.

inherited

Operators

operator ==(other) bool

The equality operator.

inherited

Static Methods

divideTiles({BuildContext context, Iterable<Widget> tiles, Color color }) Iterable<Widget>

Add a one pixel border in between each tile. If color isn't specified the ThemeData.dividerColor of the context's Theme is used.