copyWith method
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
PhotoSize copyWith({
String? type,
File? photo,
int? width,
int? height,
List<int>? progressiveSizes,
}) =>
PhotoSize(
type: type ?? this.type,
photo: photo ?? this.photo,
width: width ?? this.width,
height: height ?? this.height,
progressiveSizes: progressiveSizes ?? this.progressiveSizes,
);