FilePickerWritable class

Singleton to accessing services of the FilePickerWritable plugin.

It can be used for:

Constructors

FilePickerWritable()
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

disposeAllIdentifiers() → Future<void>
Dispose of all identifiers persisted for your app. Afterwards, you will need the user to re-pick any files in order to access them.
disposeIdentifier(String identifier) → Future<void>
Dispose of a persistable identifier, removing it from your app's list of accessible files. Afterwards, you will need the user to re-pick the file in order to access it again.
init() → FilePickerState
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openFile<T>(FileReader<T> reader) → Future<T?>
Shows a file picker so the user can select a file and calls reader afterwards.
openFileForCreate({required String fileName, required Future<void> writer(File tempFile)}) → Future<FileInfo?>
Opens a file picker for the user to create a file. It suggests an fileName file name and creates a file with the contents written to the temp file by writer.
openFilePicker() → Future<FileInfo?>
openFilePickerForCreate(File file) → Future<FileInfo?>
Use openFileForCreate instead.
readFile<T>({required String identifier, required FileReader<T> reader}) → Future<T>
Reads the file previously picked by the user. Expects a FileInfo.identifier string for identifier.
toString() → String
A string representation of this object.
inherited
writeFile({required String identifier, String fileName = 'temp', required Future<void> writer(File tempFile)}) → Future<FileInfo>
Writes data to a file previously picked by the user. Expects a FileInfo.identifier string for identifier. The writer will receive a file in a temporary directory named fileName (if not given will be called temp). The temporary directory will be deleted when writing is complete.
writeFileWithIdentifier(String identifier, File file) → Future<FileInfo>
Writes the file previously picked by the user. Expects a FileInfo.identifier string for identifier.

Operators

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