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:



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.



dense bool

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

enabled bool

Whether this list tile is interactive.

isThreeLine bool

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

leading Widget

A widget to display before the title.

onLongPress GestureLongPressCallback

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

onTap GestureTapCallback

Called when the user taps this list tile.

selected bool

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

subtitle Widget

Additional content displayed below the title.

title Widget

The primary content of the list tile.

trailing Widget

A widget to display after the title.

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


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.

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.

toString() String

Returns a string representation of this object.

toStringShort() String

A short, textual description of this widget.



operator ==(other) bool

The equality operator.


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.