flutter_file_saver_dev 0.1.1 copy "flutter_file_saver_dev: ^0.1.1" to clipboard
flutter_file_saver_dev: ^0.1.1 copied to clipboard

Interface to provide a way to save files on the device in Flutter Dev.

flutter_file_saver_dev #

melos Pub Version

Interface to provide a way to save files on the device in Flutter.

Platform Support #

Android iOS Web Windows Linux MacOS
writeFileAsBytes ❌️ ❌️
writeFileAsString ❌️ ❌️

Getting Started #

Import the package #

dependencies:
    flutter_file_saver_dev: any

Platform Setup #

Android Setup
android {
    defaultConfig {
        minSdkVersion 19
    }
}

Check example

iOS Setup

Add the following permissions to your ios/Runner/Info.plist:

<key>UISupportsDocumentBrowser</key>
<true/>
<key>UIFileSharingEnabled</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>

Check example

MacOS Setup

Add the following permissions to your macos/Runner/DebugProfile.entitlements:

<key>com.apple.security.files.user-selected.read-write</key>
<true/>

Check example

Methods #

writeFileAsBytes #

Write a file on the device from a Uint8List.

FlutterFileSaver().writeFileAsBytes(
    fileName: 'file.txt',
    bytes: fileBytes,
);

writeFileAsString #

Write a file on the device from a String. This will most of the time convert your data and perform a call to writeFileAsBytes.

FlutterFileSaver().writeFileAsString(
    fileName: 'file.txt',
    string: 'Hello World!',
);

Todo #

  • Support for Windows & Linux
  • Support custom local paths
1
likes
130
points
37
downloads

Publisher

unverified uploader

Weekly Downloads

Interface to provide a way to save files on the device in Flutter Dev.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_file_manager_android, flutter_file_manager_ios, flutter_file_manager_macos, flutter_file_manager_platform_interface, flutter_file_manager_web

More

Packages that depend on flutter_file_saver_dev