file_access 1.0.3 copy "file_access: ^1.0.3" to clipboard
file_access: ^1.0.3 copied to clipboard

discontinuedreplaced by: file_picker

A Flutter package to handel files on Web, Desktop and Mobile instead of File.io

file_access #

An abstract way to handle files on iOS, Android, Desktop and Web!

Online Demo: https://rodydavis.github.io/file_access/

Installing:

dependencies:
  flutter:
    sdk: flutter
  file_access:
    git: https://github.com/rodydavis/file_access
copied to clipboard

Setup #

Web #

Add the following line to your body to make it work in Safari:

<input type="file" style="visibility:hidden;" id="file-picker" />
copied to clipboard

IOS #

https://github.com/miguelpruivo/flutter_file_picker/wiki/Setup#ios

Getting Started #

Pick a file:

final _file = await openFile();

copied to clipboard

Select multiple files:

final _files = await openFiles();

copied to clipboard

Pick an image:

final _file = await pickImage();

copied to clipboard

Pick a video:

final _file = await pickVideo();

copied to clipboard

Once you have the FileX type you can read the data:

final _bytes = await _file.readAsBytes();
final _string = await _file.readAsString();
copied to clipboard

Creating a new file:

final _file = FileX('path/to/file/file.txt');
await _file.writeAsString('My New Data!');
final _output = await _file.readAsString();
print(_output); // 'My New Data!'
copied to clipboard
25
likes
30
points
55
downloads

Publisher

verified publisherrodydavis.com

Weekly Downloads

2024.09.09 - 2025.03.24

A Flutter package to handel files on Web, Desktop and Mobile instead of File.io

Repository (GitHub)

License

unknown (license)

Dependencies

file_picker, flutter, image_picker

More

Packages that depend on file_access