PlatformFile class abstract base

The abstract representation of a picked file on the current platform.

Depending on the current platform, an implementation may provide additional properties or methods specific to that platform.

Constructors

PlatformFile()

Properties

extension String?
The file extension of name, without the leading dot, or null if name has none.
no setter
hashCode int
The hash code for this object.
no setterinherited
name String
The name of the underlying file, including the extension.
no setter
path String?
The local file path of the underlying file, or null if not on local disk.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uri Uri
An Uri to the underlying file.
no setter
xFile XFile
Get this file as an XFile.
no setter

Methods

length() Future<int>
Get the length of the file in bytes.
lengthSync() int?
The length of the file in bytes, if already known without doing I/O, or null otherwise.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readAsBytes() Future<Uint8List>
Read the bytes of the file as a single chunk.
readAsByteStream() Stream<Uint8List>
Read the file content as a stream of bytes.
toString() String
A string representation of this object.
inherited

Operators

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