FilePicker class abstract final

The primary entry point for picking files and directories across platforms.

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

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

Static Methods

clearTemporaryFiles() Future<void>
Asks the underlying platform to remove any temporary files created by this plugin.
getDirectoryPath({String? dialogTitle, bool lockParentWindow = false, String? initialDirectory, Object? androidSafOptions, AndroidOptions androidOptions = const AndroidOptions(), WindowsOptions windowsOptions = const WindowsOptions(), LinuxOptions linuxOptions = const LinuxOptions(), WebOptions webOptions = const WebOptions()}) Future<String?>
Selects a directory and returns its absolute path.
pickFile({String? dialogTitle, String? initialDirectory, FileType type = FileType.any, List<String>? allowedExtensions, dynamic onFileLoading(FilePickerStatus)?, int compressionQuality = 0, bool lockParentWindow = false, bool cancelUploadOnWindowBlur = true, Object? androidSafOptions, AndroidOptions androidOptions = const AndroidOptions(), WindowsOptions windowsOptions = const WindowsOptions(), LinuxOptions linuxOptions = const LinuxOptions(), WebOptions webOptions = const WebOptions()}) Future<PlatformFile?>
Opens a native file explorer and lets the user select a single file.
pickFileAndDirectoryPaths({String? dialogTitle, String? initialDirectory, FileType type = FileType.any, List<String>? allowedExtensions}) Future<List<String>>
Displays a dialog that allows the user to select both files and directories simultaneously, returning their absolute paths.
pickFiles({String? dialogTitle, String? initialDirectory, FileType type = FileType.any, List<String>? allowedExtensions, dynamic onFileLoading(FilePickerStatus)?, int compressionQuality = 0, bool allowMultiple = true, bool withData = kIsWeb, bool withReadStream = false, bool lockParentWindow = false, bool readSequential = false, bool cancelUploadOnWindowBlur = true, Object? androidSafOptions, AndroidOptions androidOptions = const AndroidOptions(), WindowsOptions windowsOptions = const WindowsOptions(), LinuxOptions linuxOptions = const LinuxOptions(), WebOptions webOptions = const WebOptions()}) Future<List<PlatformFile>>
Retrieves the file(s) from the underlying platform.
saveFile({required String fileName, required Uint8List bytes, String mimeType = 'application/octet-stream', String? dialogTitle, String? initialDirectory, FileType type = FileType.any, List<String>? allowedExtensions, dynamic onFileSaving(FilePickerStatus)?, bool lockParentWindow = false, WindowsOptions windowsOptions = const WindowsOptions(), LinuxOptions linuxOptions = const LinuxOptions(), WebOptions webOptions = const WebOptions()}) Future<Uri?>
Opens a save file dialog to let the user select a location and a file name to save bytes to.
skipEntitlementsChecks() Future<void>
Deprecated entitlement check helper for legacy compatibility.