ListTileTheme constructor Null safety
- {Key? key,
- ListTileThemeData? data,
- bool? dense,
- ShapeBorder? shape,
- ListTileStyle? style,
- Color? selectedColor,
- Color? iconColor,
- Color? textColor,
- EdgeInsetsGeometry? contentPadding,
- Color? tileColor,
- Color? selectedTileColor,
- bool? enableFeedback,
- MaterialStateProperty<
MouseCursor?> ? mouseCursor, - double? horizontalTitleGap,
- double? minVerticalPadding,
- double? minLeadingWidth,
- required Widget child}
Creates a list tile theme that defines the color and style parameters for descendant ListTiles.
Only the data
parameter should be used. The other parameters are
redundant (are now obsolete) and will be deprecated in a future update.
Implementation
const ListTileTheme({
super.key,
ListTileThemeData? data,
bool? dense,
ShapeBorder? shape,
ListTileStyle? style,
Color? selectedColor,
Color? iconColor,
Color? textColor,
EdgeInsetsGeometry? contentPadding,
Color? tileColor,
Color? selectedTileColor,
bool? enableFeedback,
MaterialStateProperty<MouseCursor?>? mouseCursor,
double? horizontalTitleGap,
double? minVerticalPadding,
double? minLeadingWidth,
required super.child,
}) : assert(
data == null ||
(shape ??
selectedColor ??
iconColor ??
textColor ??
contentPadding ??
tileColor ??
selectedTileColor ??
enableFeedback ??
mouseCursor ??
horizontalTitleGap ??
minVerticalPadding ??
minLeadingWidth) == null),
_data = data,
_dense = dense,
_shape = shape,
_style = style,
_selectedColor = selectedColor,
_iconColor = iconColor,
_textColor = textColor,
_contentPadding = contentPadding,
_tileColor = tileColor,
_selectedTileColor = selectedTileColor,
_enableFeedback = enableFeedback,
_mouseCursor = mouseCursor,
_horizontalTitleGap = horizontalTitleGap,
_minVerticalPadding = minVerticalPadding,
_minLeadingWidth = minLeadingWidth;