file_saver 0.0.1 copy "file_saver: ^0.0.1" to clipboard
file_saver: ^0.0.1 copied to clipboard

outdated

This package will help you save file with a single method on any platform including macOS, iOS, Android, Windows, Web, Linux.

FileSaver #

This plugin package is not much but only for saving files in Android, iOS and Web. The package depends on path_provider for Android and iOS and basic html anchor for Web The main reason I built this plugin was to avoid using html only for downloading files. The plugin is pretty simple and saves the file in Documents folder in android and iOS and directly downloads the file in Web.

Getting Started #

The plugin itself is pretty easy to use. Just call the method saveFile()

    FileSaver.instance.saveFile(String name,List<int> bytes,String ext, mimeType: MimeType);

and call saveFile() with respective parameter. This saveFile() method takes 3 Positional Arguments. String name which takes the name of the file, Uint8List bytes which will be your actual encoded file, String ext this will be your file extension. 1 Optional Named Argument Specificall for Web MimeType type which will be your file type, MimeType is also included in my Package, I've included types for Sheets, Presentation, Word, Plain Text, PDF, MP3, MP4 and many other common formats

And You're done

Thank You For Reading this far :) #

333
likes
0
pub points
98%
popularity

Publisher

verified publisherhassanansari.dev

This package will help you save file with a single method on any platform including macOS, iOS, Android, Windows, Web, Linux.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, flutter_web_plugins, path_provider, path_provider_linux, path_provider_windows

More

Packages that depend on file_saver