PassportFile class abstract
This object represents a file uploaded to Telegram Passport. Currently, all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.
- Available extensions
- Annotations
-
- @freezed
Constructors
- PassportFile.new({@JsonKey(name: 'file_id') required String fileId, @JsonKey(name: 'file_unique_id') required String fileUniqueId, @JsonKey(name: 'file_size') required int fileSize, @JsonKey(name: 'file_date') required int fileDate})
-
Constructs a PassportFile object
constfactory
-
PassportFile.fromJson(Map<
String, dynamic> json) -
Creates a PassportFile object from JSON object
factory
Properties
-
copyWith
→ $PassportFileCopyWith<
PassportFile> -
Create a copy of PassportFile
with the given fields replaced by the non-null parameter values.
no setterinherited
- fileDate → int
-
Unix time when the file was uploaded
no setterinherited
- fileDateTime → DateTime
-
Available on PassportFile, provided by the PassportFileExt extension
Returns the DateTime object offileDate
.no setter - fileId → String
-
Unique identifier for this file
no setterinherited
- fileSize → int
-
File size
no setterinherited
- fileUniqueId → String
-
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.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this PassportFile to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited