copyWith method

  1. @override
ClipRectModifierSpec copyWith({
  1. CustomClipper<Rect>? clipper,
  2. Clip? clipBehavior,
})
override

Creates a copy of this spec with the given fields replaced by the non-null parameter values.

Implementation

@override
ClipRectModifierSpec copyWith({
  CustomClipper<Rect>? clipper,
  Clip? clipBehavior,
}) {
  return ClipRectModifierSpec(
    clipper: clipper ?? this.clipper,
    clipBehavior: clipBehavior ?? this.clipBehavior,
  );
}