Skip to content

A flutter plugin to launch the native file explorer or get list of supported applications for a file ('Open with' feature)

License

Notifications You must be signed in to change notification settings

skalio/native-file-explorer-launcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

native_file_explorer_launcher

A flutter plugin to launch the native file explorer/a file or get a list of supported applications for a desired file.

Supported Platforms
Windows
macOS

Usage

To use this plugin, add native_file_explorer_launcher as a dependency in your pubspec.yaml file.

// launches the native file explorer, i.e. `Finder`for macOS and `Explorer` for Windows and selects the file
bool isSuccessful = await NativeFileExplorerLauncher.showFileInNativeFileExplorer(filePath)

// launches the file using the default application
bool isSuccessful = await NativeFileExplorerLauncher.launchFile(filePath)

// launches the file using the passed application handler
bool isSuccessful = await NativeFileExplorerLauncher.launchFile(filePath, applicationHandler)

// get a list of supported applications for the desired file, including the name, url and the icon data of every application. If no application is found, it returns an empty list
List<AppHandler> =  await NativeFileExplorerLauncher.getSupportedApplications(String filePath)