copyWith method

ProfilePhoto copyWith({
  1. int? id,
  2. File? small,
  3. File? big,
  4. Minithumbnail? minithumbnail()?,
  5. bool? hasAnimation,
  6. 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

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