copyWith method

  1. @override
ChatEventBackgroundChanged copyWith({
  1. ChatBackground? oldBackground()?,
  2. ChatBackground? newBackground()?,
})
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
ChatEventBackgroundChanged copyWith({
  ChatBackground? Function()? oldBackground,
  ChatBackground? Function()? newBackground,
}) =>
    ChatEventBackgroundChanged(
      oldBackground:
          oldBackground != null ? oldBackground() : this.oldBackground,
      newBackground:
          newBackground != null ? newBackground() : this.newBackground,
    );