RemoteFile class final

RemoteFile (remoteFile) - basic class

Represents a remote file.

  • id: Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers.. If the identifier starts with "http://" or "https://", it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known.. If downloadFile/addFileToDownloads is called on such a file or if it is sent to a secret chat, TDLib starts a file generation process by sending updateFileGenerationStart to the application with the HTTP URL in the original_path and "#url#" as the conversion string.. Application must generate the file by downloading it to the specified location.
  • uniqueId: Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time.
  • isUploadingActive: True, if the file is currently being uploaded (or a remote copy is being generated by some other means).
  • isUploadingCompleted: True, if a remote copy is fully available.
  • uploadedSize: Size of the remote available part of the file, in bytes; 0 if unknown.
Inheritance

Constructors

RemoteFile({required String id, required String uniqueId, required bool isUploadingActive, required bool isUploadingCompleted, required int uploadedSize})
RemoteFile (remoteFile) - basic class
const
RemoteFile.fromJson(Map<String, dynamic> json)
Parse from a json
factory

Properties

clientId → int?
Client ID, from which this object was received
no setterinherited
currentObjectId → String
TDLib object type for current class instance
no setteroverride
extra → dynamic
A sign from TDLib update
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
id → String
Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers.. If the identifier starts with "http://" or "https://", it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known.. If downloadFile/addFileToDownloads is called on such a file or if it is sent to a secret chat, TDLib starts a file generation process by sending updateFileGenerationStart to the application with the HTTP URL in the original_path and "#url#" as the conversion string.. Application must generate the file by downloading it to the specified location
final
isUploadingActive → bool
True, if the file is currently being uploaded (or a remote copy is being generated by some other means)
final
isUploadingCompleted → bool
True, if a remote copy is fully available
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
uniqueId → String
Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time
final
uploadedSize → int
Size of the remote available part of the file, in bytes; 0 if unknown
final

Methods

copyWith({String? id, String? uniqueId, bool? isUploadingActive, bool? isUploadingCompleted, int? uploadedSize}) → RemoteFile
Copy model with modified properties.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Convert model to TDLib JSON format
override
toString() → String
Convert model to TDLib JSON format, encoded into String.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

defaultObjectId → const String
TDLib object type