storage_space_info 1.0.0 copy "storage_space_info: ^1.0.0" to clipboard
storage_space_info: ^1.0.0 copied to clipboard

A Flutter plugin to get total, used and free storage for Android and iOS.

📦 storage_space_info #

A simple and lightweight Flutter plugin to get device storage information on both Android and iOS.

This plugin provides:

  • total → Total device storage
  • used → Used storage
  • free → Available free storage

Works perfectly on:

  • ✅ Android
  • ✅ iOS

🚀 Installation #

Add the plugin to your pubspec.yaml:

dependencies:
  storage_space_info: ^1.0.0

Then run:

flutter pub get

📌 Import #

import 'package:storage_space_info/storage_space_info.dart';

🔥 Usage #

final storage = await StorageSpaceInfo.getStorage();

print("Total Storage : ${storage['total']}");
print("Used Storage  : ${storage['used']}");
print("Free Storage  : ${storage['free']}");

🧩 Example Output #

{
  "total": 256,
  "used": 180,
  "free": 76
}

📱 Platform Support #

Platform Support
Android
iOS

📘 Example UI #

import 'package:flutter/material.dart';
import 'package:storage_space_info/storage_space_info.dart';

class StoragePage extends StatefulWidget {
  @override
  _StoragePageState createState() => _StoragePageState();
}

class _StoragePageState extends State<StoragePage> {
  Map<String, dynamic>? storage;

  @override
  void initState() {
    super.initState();
    loadData();
  }

  Future<void> loadData() async {
    final data = await StorageSpaceInfo.getStorage();
    setState(() => storage = data);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("Storage Info")),
      body: storage == null
          ? Center(child: CircularProgressIndicator())
          : Padding(
              padding: EdgeInsets.all(16),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Text("Total Storage: ${storage!['total']} bytes"),
                  Text("Used Storage : ${storage!['used']} bytes"),
                  Text("Free Storage : ${storage!['free']} bytes"),
                ],
              ),
            ),
    );
  }
}

✨ Features #

  • Simple and clean API
  • No third-party dependencies
  • Fast and lightweight
  • Works on Android & iOS
  • Accurate storage info

🙌 Contribution #

Pull requests are welcome!

📄 License #


If you want:
example/ project code
✅ GitHub repo structure
✅ pub.dev-ready package files

Just tell me “pub.dev full setup aapo” and I’ll prepare everything.

1
likes
150
points
9
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin to get total, used and free storage for Android and iOS.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on storage_space_info

Packages that implement storage_space_info