copyWith method

  1. @override
InputMessageVideoNote copyWith({
  1. InputFile? videoNote,
  2. InputThumbnail? thumbnail()?,
  3. int? duration,
  4. int? length,
})
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
InputMessageVideoNote copyWith({
  InputFile? videoNote,
  InputThumbnail? Function()? thumbnail,
  int? duration,
  int? length,
}) =>
    InputMessageVideoNote(
      videoNote: videoNote ?? this.videoNote,
      thumbnail: thumbnail != null ? thumbnail() : this.thumbnail,
      duration: duration ?? this.duration,
      length: length ?? this.length,
    );