Skip to content
pubscout

flutter_storage_info

1.0.1, released 10 months ago by jaberio.dev

Flutter plugin to retrieve internal and external storage usage on Android devices.

WASM-ready
$ flutter pub add flutter_storage_info
Source repository

What it does

Provides methods to get total, free and used space for internal and external storage, convert values to MB/GB, calculate directory sizes and detect low‑storage conditions. All calls return futures with byte or numeric values.

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

Use it when

  • You need to display or log device storage statistics
  • You want to warn users when device storage is low
  • You need to calculate size of specific directories

Skip it when

  • Your app must run on iOS or other platforms without storage support
  • You require real‑time storage monitoring without polling
  • You prefer a solution that doesn't need extra Android permissions

Strengths

  • Simple, focused API for storage queries
  • Supports both internal and external (SD card) storage
  • Includes helper methods for unit conversion and low‑storage detection

Weaknesses

  • Android‑only; iOS support is pending
  • Requires READ/WRITE_EXTERNAL_STORAGE permissions
  • No streaming or continuous monitoring features

Setup

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

Add <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> and <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> to AndroidManifest.xml. No additional build steps required.

import 'package:flutter_storage_info/flutter_storage_info.dart';

void main() async {
  int total = await FlutterStorageInfo.storageTotalSpace;
  int free = await FlutterStorageInfo.storageFreeSpace;
  int used = await FlutterStorageInfo.storageUsedSpace;
  print('Total: $total, Free: $free, Used: $used');
}

Alternatives

Packages that do the same job and could replace flutter_storage_info.

Works with

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