disk 0.2.1 disk: ^0.2.1 copied to clipboard
A flutter plugin for android to get storage volumes' information.
Disk #
A flutter plugin for android to get storage volumes' information.
Add package from github #
dependencies:
disk:
git:
url: git://github.com/0xba1/disk
ref: main
Example #
import 'package:disk/disk.dart';
String path = "/sdcard/";
int totalSpace = Disk.getTotalBytes(path);
int freeSpace = Disk.getUsedBytes(path);
int usedSpace = totalSpace - freeSpace;
// To get paths of all mounted `StorageVolumes`
List<String> storageVolumePaths = Disk.getStorageVolumePaths();
for storageVolumePath in storageVolumePaths {
print("storageVolumePath");
}