disk_space_2 1.0.2 copy "disk_space_2: ^1.0.2" to clipboard
disk_space_2: ^1.0.2 copied to clipboard

A Flutter package that provides an easy way to get disk space information on Android and iOS devices.

Disk Space #

A Flutter package that provides an easy way to get disk space information on Android and iOS devices.

Note

This is a fork of the disk_space package from Marvin Böddeker. Since it was not maintained, we decided to fork it and maintain it ourself. We will be adding new features and fixing bugs as needed.

Description #

This package allows you to get the following information about the device's disk space:

  • Free disk space
  • Total disk space
  • Free disk space for a specific path

Installation #

To use this package, add disk_space as a dependency in your pubspec.yaml file.

flutter pub add disk_space

or

dependencies:
  disk_space: ^0.0.1

Usage #

import 'package:disk_space/disk_space.dart';

void main() async {
  double? freeDiskSpace = await DiskSpace.getFreeDiskSpace;
  print('Free disk space: $freeDiskSpace');

  double? totalDiskSpace = await DiskSpace.getTotalDiskSpace;
  print('Total disk space: $totalDiskSpace');

  double? freeDiskSpaceForPath = await DiskSpace.getFreeDiskSpaceForPath('/path/to/directory');
  print('Free disk space for path: $freeDiskSpaceForPath');
}

Contributing #

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Contributors #

Tom Ludwig
Tom Ludwig

Original Contributors #

Marvin Böddeker
Marvin Böddeker

Jon Phipps
Jon Phipps

License #

This project is licensed under the MIT

5
likes
0
pub points
87%
popularity

Publisher

unverified uploader

A Flutter package that provides an easy way to get disk space information on Android and iOS devices.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on disk_space_2