PassportFile constructor

const PassportFile({
  1. @JsonKey(name: 'file_id') required String fileId,
  2. @JsonKey(name: 'file_unique_id') required String fileUniqueId,
  3. @JsonKey(name: 'file_size') required int fileSize,
  4. @JsonKey(name: 'file_date') required int fileDate,
})

Constructs a PassportFile object

Implementation

const factory PassportFile({
  /// 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
  @JsonKey(name: 'file_size') required int fileSize,

  /// Unix time when the file was uploaded
  ///
  /// You can get the [DateTime] object as [fileDateTime] getter.
  @JsonKey(name: 'file_date') required int fileDate,
}) = _PassportFile;