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. double? minTileHeight,
  17. bool? enableFeedback,
  18. MaterialStateProperty<MouseCursor?>? mouseCursor,
  19. bool? isThreeLine,
  20. VisualDensity? visualDensity,
  21. ListTileTitleAlignment? titleAlignment,
  22. ListTileControlAffinity? controlAffinity,
})

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,
  double? minTileHeight,
  bool? enableFeedback,
  MaterialStateProperty<MouseCursor?>? mouseCursor,
  bool? isThreeLine,
  VisualDensity? visualDensity,
  ListTileTitleAlignment? titleAlignment,
  ListTileControlAffinity? controlAffinity,
}) {
  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,
    minTileHeight: minTileHeight ?? this.minTileHeight,
    enableFeedback: enableFeedback ?? this.enableFeedback,
    mouseCursor: mouseCursor ?? this.mouseCursor,
    visualDensity: visualDensity ?? this.visualDensity,
    titleAlignment: titleAlignment ?? this.titleAlignment,
    controlAffinity: controlAffinity ?? this.controlAffinity,
  );
}