Skip to content
pubscout

saf_util

3.1.1, released 7 weeks ago by flutter-cavalry.com

Utility functions for Android's Storage Access Framework (SAF)

WASM-ready
$ flutter pub add saf_util
Source repository

What it does

Provides utility functions to interact with Android's Storage Access Framework, including pickers for files, directories, and media, as well as DocumentFile wrappers and permission utilities.

AI-written summary of version 3.1.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to pick files, directories, or media using Android's Storage Access Framework.
  • You need to inspect, move, copy, rename, or delete files via DocumentFile wrappers on Android.
  • You need to manage persisted permissions for URIs on Android.

Skip it when

  • You need built-in read and write functions directly in this package.
  • You are developing for non-Android platforms where SAF is not applicable.

Strengths

  • Comprehensive coverage of SAF DocumentFile operations and pickers.
  • Supports persisting and releasing permissions for URIs.

Weaknesses

  • Does not provide read or write functions out of the box (requires saf_stream).
  • Android platform specific.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
1

Requires Android platform configuration as it is an Android plugin for SAF.

final directory = await SafUtil().pickDirectory();

Alternatives

Packages that do the same job and could replace saf_util.

  • saf

    Access and manage files and folders via Android Storage Access Framework

  • docman

    Flutter plugin for file and directory operations on Android using SAF API.

Works with

Packages commonly used together with saf_util: ones it builds on, ones built on it, and its own family.