file_selector 0.8.3 copy "file_selector: ^0.8.3" to clipboard
file_selector: ^0.8.3 copied to clipboard

outdated

Flutter plugin for opening and saving files, or selecting directories, using native file selection UI.

file_selector #

pub package

A Flutter plugin that manages files and interactions with file dialogs.

Usage #

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

Examples #

Here are small examples that show you how to use the API.
Please also take a look at our example app.

Open a single file

final typeGroup = XTypeGroup(label: 'images', extensions: ['jpg', 'png']);
final file = await openFile(acceptedTypeGroups: [typeGroup]);

Open multiple files at once

final typeGroup = XTypeGroup(label: 'images', extensions: ['jpg', 'png']);
final files = await openFiles(acceptedTypeGroups: [typeGroup]);

Saving a file

final path = await getSavePath();
final name = "hello_file_selector.txt";
final data = Uint8List.fromList("Hello World!".codeUnits);
final mimeType = "text/plain";
final file = XFile.fromData(data, name: name, mimeType: mimeType);
await file.saveTo(path);
319
likes
0
pub points
98%
popularity

Publisher

verified publisherflutter.dev

Flutter plugin for opening and saving files, or selecting directories, using native file selection UI.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

file_selector_platform_interface, file_selector_web, file_selector_windows, flutter

More

Packages that depend on file_selector