copyWith method

TListCardTheme copyWith({
  1. Color? backgroundColor,
  2. Color? selectedBackgroundColor,
  3. Color? disabledBackgroundColor,
  4. EdgeInsets? padding,
  5. double? levelIndentation,
  6. bool? showSelectionIndicator,
  7. Widget expansionIndicatorBuilder(
    1. bool isExpanded,
    2. bool isDisabled
    )?,
  8. Widget selectionIndicatorBuilder(
    1. bool multiple,
    2. bool isSelected,
    3. bool isDisabled
    )?,
  9. Widget contentBuilder(
    1. String title,
    2. String? subTitle,
    3. String? imageUrl,
    4. bool isSelected,
    5. bool isDisabled,
    )?,
})

Implementation

TListCardTheme copyWith({
  Color? backgroundColor,
  Color? selectedBackgroundColor,
  Color? disabledBackgroundColor,
  EdgeInsets? padding,
  double? levelIndentation,
  bool? showSelectionIndicator,
  Widget Function(bool isExpanded, bool isDisabled)? expansionIndicatorBuilder,
  Widget Function(bool multiple, bool isSelected, bool isDisabled)? selectionIndicatorBuilder,
  Widget Function(String title, String? subTitle, String? imageUrl, bool isSelected, bool isDisabled)? contentBuilder,
}) {
  return TListCardTheme(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    selectedBackgroundColor: selectedBackgroundColor ?? this.selectedBackgroundColor,
    disabledBackgroundColor: disabledBackgroundColor ?? this.disabledBackgroundColor,
    padding: padding ?? this.padding,
    levelIndentation: levelIndentation ?? this.levelIndentation,
    showSelectionIndicator: showSelectionIndicator ?? this.showSelectionIndicator,
    expansionIndicatorBuilder: expansionIndicatorBuilder ?? this.expansionIndicatorBuilder,
    selectionIndicatorBuilder: selectionIndicatorBuilder ?? this.selectionIndicatorBuilder,
    contentBuilder: contentBuilder ?? this.contentBuilder,
  );
}