copyWith method

Thumbnail copyWith({
  1. ThumbnailFormat? format,
  2. int? width,
  3. int? height,
  4. File? file,
})

Copy model with modified properties.

Properties:

  • format: Thumbnail format
  • width: Thumbnail width
  • height: Thumbnail height
  • file: The thumbnail

Implementation

Thumbnail copyWith({
  ThumbnailFormat? format,
  int? width,
  int? height,
  File? file,
}) =>
    Thumbnail(
      format: format ?? this.format,
      width: width ?? this.width,
      height: height ?? this.height,
      file: file ?? this.file,
    );