copyWith method

ListTileThemeData copyWith(
  1. {bool? dense,
  2. ShapeBorder? shape,
  3. ListTileStyle? style,
  4. Color? selectedColor,
  5. Color? iconColor,
  6. Color? textColor,
  7. TextStyle? titleTextStyle,
  8. TextStyle? subtitleTextStyle,
  9. TextStyle? leadingAndTrailingTextStyle,
  10. EdgeInsetsGeometry? contentPadding,
  11. Color? tileColor,
  12. Color? selectedTileColor,
  13. double? horizontalTitleGap,
  14. double? minVerticalPadding,
  15. double? minLeadingWidth,
  16. bool? enableFeedback,
  17. MaterialStateProperty<MouseCursor?>? mouseCursor,
  18. bool? isThreeLine,
  19. VisualDensity? visualDensity,
  20. ListTileTitleAlignment? titleAlignment}
)

Creates a copy of this object with the given fields replaced with the new values.

Implementation

ListTileThemeData copyWith({
  bool? dense,
  ShapeBorder? shape,
  ListTileStyle? style,
  Color? selectedColor,
  Color? iconColor,
  Color? textColor,
  TextStyle? titleTextStyle,
  TextStyle? subtitleTextStyle,
  TextStyle? leadingAndTrailingTextStyle,
  EdgeInsetsGeometry? contentPadding,
  Color? tileColor,
  Color? selectedTileColor,
  double? horizontalTitleGap,
  double? minVerticalPadding,
  double? minLeadingWidth,
  bool? enableFeedback,
  MaterialStateProperty<MouseCursor?>? mouseCursor,
  bool? isThreeLine,
  VisualDensity? visualDensity,
  ListTileTitleAlignment? titleAlignment,
}) {
  return ListTileThemeData(
    dense: dense ?? this.dense,
    shape: shape ?? this.shape,
    style: style ?? this.style,
    selectedColor: selectedColor ?? this.selectedColor,
    iconColor: iconColor ?? this.iconColor,
    textColor: textColor ?? this.textColor,
    titleTextStyle: titleTextStyle ?? this.titleTextStyle,
    subtitleTextStyle: subtitleTextStyle ?? this.subtitleTextStyle,
    leadingAndTrailingTextStyle: leadingAndTrailingTextStyle ?? this.leadingAndTrailingTextStyle,
    contentPadding: contentPadding ?? this.contentPadding,
    tileColor: tileColor ?? this.tileColor,
    selectedTileColor: selectedTileColor ?? this.selectedTileColor,
    horizontalTitleGap: horizontalTitleGap ?? this.horizontalTitleGap,
    minVerticalPadding: minVerticalPadding ?? this.minVerticalPadding,
    minLeadingWidth: minLeadingWidth ?? this.minLeadingWidth,
    enableFeedback: enableFeedback ?? this.enableFeedback,
    mouseCursor: mouseCursor ?? this.mouseCursor,
    visualDensity: visualDensity ?? this.visualDensity,
    titleAlignment: titleAlignment ?? this.titleAlignment,
  );
}