LocalFile class final

Represents a local file

Inheritance

Constructors

LocalFile({required String path, required bool canBeDownloaded, required bool canBeDeleted, required bool isDownloadingActive, required bool isDownloadingCompleted, required int downloadOffset, required int downloadedPrefixSize, required int downloadedSize})
Represents a local file
const
LocalFile.fromJson(Map<String, dynamic> json)
Parses a LocalFile from TDLib JSON.
factory

Properties

canBeDeleted → bool
True, if the file can be deleted
final
canBeDownloaded → bool
True, if it is possible to download or generate the file
final
clientId → int?
Identifier of the TDLib client that sent this object, when known.
no setterinherited
downloadedPrefixSize → int
If is_downloading_completed is false, then only some prefix of the file starting from download_offset is ready to be read. downloaded_prefix_size is the size of that prefix in bytes
final
downloadedSize → int
Total downloaded file size, in bytes. Can be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage
final
downloadOffset → int
Download will be started from this offset. downloaded_prefix_size is calculated from this offset
final
extra → dynamic
"@extra" of the request this object answers; null for updates.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
isDownloadingActive → bool
True, if the file is currently being downloaded (or a local copy is being generated by some other means)
final
isDownloadingCompleted → bool
True, if the local copy is fully available
final
path → String
Local path to the locally available file part; may be empty
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({String? path, bool? canBeDownloaded, bool? canBeDeleted, bool? isDownloadingActive, bool? isDownloadingCompleted, int? downloadOffset, int? downloadedPrefixSize, int? downloadedSize}) → LocalFile
Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.
getConstructor() → String
TDLib type name, e.g. updateNewMessage.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this object to TDLib JSON.
override
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

CONSTRUCTOR → const String
TDLib type name.