copyWith method

S2ModalStyle copyWith({
  1. ShapeBorder shape,
  2. double elevation,
  3. Color backgroundColor,
  4. Clip clipBehavior,
})

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

Implementation

S2ModalStyle copyWith({
  ShapeBorder shape,
  double elevation,
  Color backgroundColor,
  Clip clipBehavior,
}) {
  return S2ModalStyle(
    shape: shape ?? this.shape,
    elevation: elevation ?? this.elevation,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    clipBehavior: clipBehavior ?? this.clipBehavior,
  );
}