FilePickerOptions class

Constructors

FilePickerOptions({String? dialogTitle, FileType type = FileType.any, List<String>? allowedExtensions, dynamic onFileLoading(FilePickerStatus)?, bool allowCompression = true, bool allowMultiple = false, bool withData = false, bool withReadStream = false})
Options for file picker functionality Hover over parameters to see docs

Properties

allowCompression bool
If allowCompression is set, it will allow media to apply the default OS compression. Defaults to true.
getter/setter pair
allowedExtensions List<String>?
Optionally, allowedExtensions might be provided (e.g. [pdf, svg, jpg].).
getter/setter pair
allowMultiple bool
getter/setter pair
dialogTitle String?
dialogTitle can be optionally set on desktop platforms to set the modal window title. It will be ignored on other platforms.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
onFileLoading ↔ (dynamic Function(FilePickerStatus)?)
If you want to track picking status, for example, because some files may take some time to be cached (particularly those picked from cloud providers), you may want to set onFileLoading handler that will give you the current status of picking.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type FileType
Default type set to FileType.any with allowMultiple set to false.
getter/setter pair
withData bool
If withData is set, picked files will have its byte data immediately available on memory as Uint8List which can be useful if you are picking it for server upload or similar. However, have in mind that enabling this on IO (iOS & Android) may result in out of memory issues if you allow multiple picks or pick huge files. Use withReadStream instead. Defaults to true on web, false otherwise.
getter/setter pair
withReadStream bool
If withReadStream is set, picked files will have its byte data available as a Stream<List<int>> which can be useful for uploading and processing large files. Defaults to false.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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