copyWith method

BottomSheetThemeData copyWith({
  1. Color? backgroundColor,
  2. Color? surfaceTintColor,
  3. double? elevation,
  4. Color? modalBackgroundColor,
  5. Color? modalBarrierColor,
  6. Color? shadowColor,
  7. double? modalElevation,
  8. ShapeBorder? shape,
  9. bool? showDragHandle,
  10. Color? dragHandleColor,
  11. Size? dragHandleSize,
  12. Clip? clipBehavior,
  13. BoxConstraints? constraints,
})

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

Implementation

BottomSheetThemeData copyWith({
  Color? backgroundColor,
  Color? surfaceTintColor,
  double? elevation,
  Color? modalBackgroundColor,
  Color? modalBarrierColor,
  Color? shadowColor,
  double? modalElevation,
  ShapeBorder? shape,
  bool? showDragHandle,
  Color? dragHandleColor,
  Size? dragHandleSize,
  Clip? clipBehavior,
  BoxConstraints? constraints,
}) {
  return BottomSheetThemeData(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    surfaceTintColor: surfaceTintColor ?? this.surfaceTintColor,
    elevation: elevation ?? this.elevation,
    modalBackgroundColor: modalBackgroundColor ?? this.modalBackgroundColor,
    modalBarrierColor: modalBarrierColor ?? this.modalBarrierColor,
    shadowColor: shadowColor ?? this.shadowColor,
    modalElevation: modalElevation ?? this.modalElevation,
    shape: shape ?? this.shape,
    showDragHandle: showDragHandle ?? this.showDragHandle,
    dragHandleColor: dragHandleColor ?? this.dragHandleColor,
    dragHandleSize: dragHandleSize ?? this.dragHandleSize,
    clipBehavior: clipBehavior ?? this.clipBehavior,
    constraints: constraints ?? this.constraints,
  );
}