copyWith method

  1. @override
LinkPreviewTypeBackground copyWith({
  1. Document? document()?,
  2. BackgroundType? backgroundType()?,
})
override

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

@override
LinkPreviewTypeBackground copyWith({
  Document? Function()? document,
  BackgroundType? Function()? backgroundType,
}) => LinkPreviewTypeBackground(
  document: document != null ? document() : this.document,
  backgroundType: backgroundType != null
      ? backgroundType()
      : this.backgroundType,
);