copyWith method

ChatPhotoInfo copyWith({
  1. File? small,
  2. File? big,
  3. Minithumbnail? minithumbnail()?,
  4. bool? hasAnimation,
  5. bool? isPersonal,
})

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

Implementation

ChatPhotoInfo copyWith({
  File? small,
  File? big,
  Minithumbnail? Function()? minithumbnail,
  bool? hasAnimation,
  bool? isPersonal,
}) =>
    ChatPhotoInfo(
      small: small ?? this.small,
      big: big ?? this.big,
      minithumbnail:
          minithumbnail != null ? minithumbnail() : this.minithumbnail,
      hasAnimation: hasAnimation ?? this.hasAnimation,
      isPersonal: isPersonal ?? this.isPersonal,
    );