copyWith method

  1. @override
PushMessageContentAnimation copyWith({
  1. Animation? animation()?,
  2. String? caption,
  3. bool? isPinned,
})
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
PushMessageContentAnimation copyWith({
  Animation? Function()? animation,
  String? caption,
  bool? isPinned,
}) =>
    PushMessageContentAnimation(
      animation: animation != null ? animation() : this.animation,
      caption: caption ?? this.caption,
      isPinned: isPinned ?? this.isPinned,
    );