ListTileThemeData class Null safety

Used with ListTileTheme to define default property values for descendant ListTile widgets, as well as classes that build ListTiles, like CheckboxListTile, RadioListTile, and SwitchListTile.

Descendant widgets obtain the current ListTileThemeData object using ListTileTheme.of(context). Instances of ListTileThemeData can be customized with ListTileThemeData.copyWith.

A ListTileThemeData is often specified as part of the overall Theme with ThemeData.listTileTheme.

All ListTileThemeData properties are null by default. When a theme property is null, the ListTile will provide its own default based on the overall Theme's textTheme and colorScheme. See the individual ListTile properties for details.

The Drawer widget specifies a list tile theme for its children that defines style to be ListTileStyle.drawer.

See also:

  • ThemeData, which describes the overall theme information for the application.
Mixed in types
Annotations

Constructors

ListTileThemeData({bool? dense, ShapeBorder? shape, ListTileStyle? style, Color? selectedColor, Color? iconColor, Color? textColor, EdgeInsetsGeometry? contentPadding, Color? tileColor, Color? selectedTileColor, double? horizontalTitleGap, double? minVerticalPadding, double? minLeadingWidth, bool? enableFeedback, MaterialStateProperty<MouseCursor?>? mouseCursor, VisualDensity? visualDensity})
Creates a ListTileThemeData.
const

Properties

contentPadding EdgeInsetsGeometry?
Overrides the default value of ListTile.contentPadding.
final
dense bool?
Overrides the default value of ListTile.dense.
final
enableFeedback bool?
Overrides the default value of ListTile.enableFeedback.
final
hashCode int
The hash code for this object.
read-onlyoverride
horizontalTitleGap double?
Overrides the default value of ListTile.horizontalTitleGap.
final
iconColor Color?
Overrides the default value of ListTile.iconColor.
final
minLeadingWidth double?
Overrides the default value of ListTile.minLeadingWidth.
final
minVerticalPadding double?
Overrides the default value of ListTile.minVerticalPadding.
final
mouseCursor MaterialStateProperty<MouseCursor?>?
If specified, overrides the default value of ListTile.mouseCursor.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
selectedColor Color?
Overrides the default value of ListTile.selectedColor.
final
selectedTileColor Color?
Overrides the default value of ListTile.selectedTileColor.
final
shape ShapeBorder?
Overrides the default value of ListTile.shape.
final
style ListTileStyle?
Overrides the default value of ListTile.style.
final
textColor Color?
Overrides the default value of ListTile.textColor.
final
tileColor Color?
Overrides the default value of ListTile.tileColor.
final
visualDensity VisualDensity?
If specified, overrides the default value of ListTile.visualDensity.
final

Methods

copyWith({bool? dense, ShapeBorder? shape, ListTileStyle? style, Color? selectedColor, Color? iconColor, Color? textColor, EdgeInsetsGeometry? contentPadding, Color? tileColor, Color? selectedTileColor, double? horizontalTitleGap, double? minVerticalPadding, double? minLeadingWidth, bool? enableFeedback, MaterialStateProperty<MouseCursor?>? mouseCursor, bool? isThreeLine, VisualDensity? visualDensity}) ListTileThemeData
Creates a copy of this object with the given fields replaced with the new values.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

lerp(ListTileThemeData? a, ListTileThemeData? b, double t) ListTileThemeData?
Linearly interpolate between ListTileThemeData objects.