copyWith method

ZeroListTileStyle copyWith({
  1. Color? selectedColor,
  2. Color? hoverColor,
  3. Color? backgroundColor,
  4. TextStyle? titleTextStyle,
  5. TextStyle? subTitleTextStyle,
  6. TextStyle? smallTitleTextStyle,
  7. TextStyle? smallSubTitleTextStyle,
  8. Color? dividerColor,
  9. EdgeInsets? contentPadding,
  10. EdgeInsets? smallContentPadding,
})

It returns a new instance of the class with the given parameters.

Args: selectedColor (Color): The color of the tile when it is selected. hoverColor (Color): The color of the tile when the mouse is hovering over it. backgroundColor (Color): The background color of the tile. titleTextStyle (TextStyle): The text style for the title. subTitleTextStyle (TextStyle): The text style of the subtitle. smallTitleTextStyle (TextStyle): The text style for the title when the list tile is small. smallSubTitleTextStyle (TextStyle): The text style for the subtitle when the list tile is small. dividerColor (Color): The color of the divider between the title and subtitle. contentPadding (EdgeInsets): The padding of the content of the list tile. smallContentPadding (EdgeInsets): The padding for the small tile.

Returns: A new instance of ZeroListTileStyle with the updated values.

Implementation

ZeroListTileStyle copyWith({
  Color? selectedColor,
  Color? hoverColor,
  Color? backgroundColor,
  TextStyle? titleTextStyle,
  TextStyle? subTitleTextStyle,
  TextStyle? smallTitleTextStyle,
  TextStyle? smallSubTitleTextStyle,
  Color? dividerColor,
  EdgeInsets? contentPadding,
  EdgeInsets? smallContentPadding,
}) {
  return ZeroListTileStyle(
    selectedColor: selectedColor ?? this.selectedColor,
    hoverColor: hoverColor ?? this.hoverColor,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    titleTextStyle: titleTextStyle ?? this.titleTextStyle,
    subTitleTextStyle: subTitleTextStyle ?? this.subTitleTextStyle,
    dividerColor: dividerColor ?? this.dividerColor,
    contentPadding: contentPadding ?? this.contentPadding,
    smallContentPadding: smallContentPadding ?? this.smallContentPadding,
    smallTitleTextStyle: smallSubTitleTextStyle ?? this.smallTitleTextStyle,
    smallSubTitleTextStyle:
        smallSubTitleTextStyle ?? this.smallSubTitleTextStyle,
  );
}