NativeWebXFile class

XFile implementation that supports efficient streaming from web.File objects.

Constructors

NativeWebXFile(File file, {String? mimeType})

Properties

hashCode int
The hash code for this object.
no setterinherited
mimeType String?
For web, it may be necessary for a file to know its MIME type.
no setterinherited
name String
The name of the file as it was selected by the user in their device.
no setterinherited
path String
Get the path of the picked file.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

lastModified() Future<DateTime>
Get the last-modified time for the CrossFile
inherited
length() Future<int>
Get the length of the file. Returns a Future<int> that completes with the length in bytes.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openRead([int? start, int? end]) Stream<Uint8List>
Create a new independent Stream for the contents of this file.
readAsBytes() Future<Uint8List>
Asynchronously read the entire file contents as a list of bytes.
inherited
readAsString({Encoding encoding = utf8}) Future<String>
Asynchronously read the entire file contents as a string using the given Encoding.
inherited
saveTo(String path) Future<void>
Save the CrossFile at the indicated file path.
inherited
toString() String
A string representation of this object.
inherited

Operators

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