android_file_storage 0.0.3 copy "android_file_storage: ^0.0.3" to clipboard
android_file_storage: ^0.0.3 copied to clipboard

PlatformAndroid

A modern Flutter plugin to save files directly to Android Downloads directory using MediaStore API without extra runtime permissions.

android_file_storage #

Save files (PDFs, Images, Text, Binary) directly to the Android Downloads directory using the native MediaStore API.

Features #

  • No WRITE_EXTERNAL_STORAGE permission required on Android 10+ (API 29+).
  • Native MediaStore integration with IS_PENDING flag support.
  • Compatible with AGP 9.0+ and modern built-in Kotlin integration.

Usage #

import 'package:android_file_storage/android_file_storage.dart';

final storage = AndroidFileStorage();

void saveDoc() async {
  final bytes = [/* Your file bytes */];
  final String? path = await storage.saveFile(
    fileName: "document.pdf",
    bytes: bytes,
    mimeType: "application/pdf",
  );
}
1
likes
145
points
--
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A modern Flutter plugin to save files directly to Android Downloads directory using MediaStore API without extra runtime permissions.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on android_file_storage

Packages that implement android_file_storage