Skip to content
pubscout

storage_space

1.4.0, released 6 weeks ago by oodavid.com

Get device storage space and app-specific storage usage with readable sizes.

WASM-ready
$ flutter pub add storage_space
Source repository

What it does

Retrieves the total, free, and available disk space on Android and iOS devices. Also calculates the specific storage space used by the app itself, including its cache and data, and provides utility helpers for human-readable sizes.

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

Use it when

  • You need to display free and total device storage to the user
  • You want to check if the device is low on storage space
  • You need to inspect how much storage your app's installation and data are consuming

Skip it when

  • You need to persist key-value pairs or structured data on the device
  • You need a secure storage mechanism for sensitive user data

Strengths

  • Provides both raw byte values and human-readable size strings
  • No special permissions required on Android or iOS
  • Includes app-specific storage breakdown (app size, data size, cache)

Weaknesses

  • Limited to device storage inspection; cannot write or manage files directly
  • Platform support restricted to Android and iOS

Setup

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

Requires Flutter 3.24+ (Dart 3.5+), Android API 21+, and iOS 13+. Includes an iOS privacy manifest declaring disk space API usage reasons.

StorageSpace freeSpace = await getStorageSpace(
  lowOnSpaceThreshold: 2 * 1024 * 1024 * 1024,
  fractionDigits: 1,
);

Alternatives

Packages that do the same job and could replace storage_space.