LivePhoto constructor

const LivePhoto({
  1. @JsonKey.new(name: 'photo') List<PhotoSize>? photo,
  2. @JsonKey.new(name: 'file_id') required String fileId,
  3. @JsonKey.new(name: 'file_unique_id') required String fileUniqueId,
  4. @JsonKey.new(name: 'width') required int width,
  5. @JsonKey.new(name: 'height') required int height,
  6. @JsonKey.new(name: 'duration') required int duration,
  7. @JsonKey.new(name: 'mime_type') String? mimeType,
  8. @JsonKey.new(name: 'file_size') int? fileSize,
})

Creates a new LivePhoto object.

Implementation

const factory LivePhoto({
  /// Optional. Available sizes of the corresponding static photo
  @JsonKey(name: 'photo') List<PhotoSize>? photo,

  /// Identifier for the video file which can be used to download or reuse the
  /// file
  @JsonKey(name: 'file_id') required String fileId,

  /// Unique identifier for the video file which is supposed to be the same
  /// over time and for different bots. Can't be used to download or reuse the
  /// file.
  @JsonKey(name: 'file_unique_id') required String fileUniqueId,

  /// Video width as defined by the sender
  @JsonKey(name: 'width') required int width,

  /// Video height as defined by the sender
  @JsonKey(name: 'height') required int height,

  /// Duration of the video in seconds as defined by the sender
  @JsonKey(name: 'duration') required int duration,

  /// Optional. MIME type of the file as defined by the sender
  @JsonKey(name: 'mime_type') String? mimeType,

  /// Optional. File size in bytes. It can be bigger than 2^31 and some
  /// programming languages may have difficulty/silent defects in
  /// interpreting it. But it has at most 52 significant bits, so a signed
  /// 64-bit integer or double-precision float type are safe for storing this
  /// value.
  @JsonKey(name: 'file_size') int? fileSize,
}) = _LivePhoto;