CrossFilePicker class

Instance this class or use CrossFilePicker.instance to start working!

The pickMultiFile and pickSingleFile methods use FilePicker The pickSingleImage, pickMultiImage and pickVideo methods use ImagePicker

Constructors

CrossFilePicker()
Retrieve the singleton from this factory
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

clearTemporaryFiles() Future<bool>
See FilePicker.clearTemporaryFiles
getDirectoryPath({String? dialogTitle, bool lockParentWindow = false, String? initialDirectory}) Future<String?>
See FilePicker.getDirectoryPath
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pickMultiFile({String? dialogTitle, String? initialDirectory, FileType type = FileType.any, List<String>? allowedExtensions, OnFileLoading? onFileLoading, bool allowCompression = false, bool allowWebStream = false, bool lockParentWindow = false}) Future<List<XFile>>
See FilePicker.pickFiles. Pick multiple files. On desktop and mobile platforms, this function uses the path to read the file. allowWebStream enables reading of streamed web files but only once.
pickSingleFile({String? dialogTitle, String? initialDirectory, FileType type = FileType.any, bool allowCompression = false, bool allowWebStream = false, List<String>? allowedExtensions, OnFileLoading? onFileLoading, bool lockParentWindow = false}) Future<XFile?>
See FilePicker.pickFiles. Pick single file On desktop and mobile platforms, this function uses the path to read the file. allowWebStream enables reading of streamed web files but only once.
saveFile({String? dialogTitle, String? fileName, String? initialDirectory, FileType type = FileType.any, List<String>? allowedExtensions, bool lockParentWindow = false}) Future<String?>
See FilePicker.getDirectoryPath
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance CrossFilePicker
You can override this instance for your own tests
getter/setter pair