copyWith method
PainterControllerValue
copyWith({
- PainterSettings? settings,
- List<
Drawable> ? drawables, - BackgroundDrawable? background = _NoBackgroundPassedBackgroundDrawable.instance,
- ObjectDrawable? selectedObjectDrawable = _NoObjectPassedBackgroundDrawable.instance,
Creates a copy of this value but with the given fields replaced with the new values.
Implementation
PainterControllerValue copyWith({
PainterSettings? settings,
List<Drawable>? drawables,
BackgroundDrawable? background =
_NoBackgroundPassedBackgroundDrawable.instance,
ObjectDrawable? selectedObjectDrawable =
_NoObjectPassedBackgroundDrawable.instance,
}) {
return PainterControllerValue(
settings: settings ?? this.settings,
drawables: drawables ?? _drawables,
background: background == _NoBackgroundPassedBackgroundDrawable.instance
? this.background
: background,
selectedObjectDrawable:
selectedObjectDrawable == _NoObjectPassedBackgroundDrawable.instance
? this.selectedObjectDrawable
: selectedObjectDrawable,
);
}