copyWith method

DrawerThemeData copyWith(
  1. {Color? backgroundColor,
  2. Color? scrimColor,
  3. double? elevation,
  4. Color? shadowColor,
  5. Color? surfaceTintColor,
  6. ShapeBorder? shape,
  7. ShapeBorder? endShape,
  8. double? width}
)

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

Implementation

DrawerThemeData copyWith({
  Color? backgroundColor,
  Color? scrimColor,
  double? elevation,
  Color? shadowColor,
  Color? surfaceTintColor,
  ShapeBorder? shape,
  ShapeBorder? endShape,
  double? width,
}) {
  return DrawerThemeData(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    scrimColor: scrimColor ?? this.scrimColor,
    elevation: elevation ?? this.elevation,
    shadowColor: shadowColor ?? this.shadowColor,
    surfaceTintColor: surfaceTintColor ?? this.surfaceTintColor,
    shape: shape ?? this.shape,
    endShape: endShape ?? this.endShape,
    width: width ?? this.width,
  );
}