ListTileTheme constructor

const ListTileTheme({
  1. Key? key,
  2. ListTileThemeData? data,
  3. bool? dense,
  4. ShapeBorder? shape,
  5. ListTileStyle? style,
  6. Color? selectedColor,
  7. Color? iconColor,
  8. Color? textColor,
  9. EdgeInsetsGeometry? contentPadding,
  10. Color? tileColor,
  11. Color? selectedTileColor,
  12. bool? enableFeedback,
  13. MaterialStateProperty<MouseCursor?>? mouseCursor,
  14. double? horizontalTitleGap,
  15. double? minVerticalPadding,
  16. double? minLeadingWidth,
  17. 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;