File constructor

const File({
  1. @JsonKey(name: 'file_id') required String fileId,
  2. @JsonKey(name: 'file_unique_id') required String fileUniqueId,
  3. @JsonKey(name: 'file_size') int? fileSize,
  4. @JsonKey(name: 'file_path') String? filePath,
})

Constructs the File object.

Implementation

const factory File({
  /// Unique identifier for this file
  @JsonKey(name: 'file_id') required String fileId,

  /// Unique identifier for this 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,

  /// File size, if known
  @JsonKey(name: 'file_size') int? fileSize,

  /// File path. Use https://api.telegram.org/file/bottoken/file_path to
  /// get the file.
  @JsonKey(name: 'file_path') String? filePath,
}) = _File;