disk 0.0.1 copy "disk: ^0.0.1" to clipboard
disk: ^0.0.1 copied to clipboard

outdated

A new flutter plugin project.

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`
    // For SDK 30 and above
    // [{"path": path, "name": name}, {"path": path, "name": name}]
    List<Map<String, String>> storageVolumes = Disk.getStorageVolumes();
    
    for storageVolume in storageVolumes {
        print("name: ${storageVolume["name"]}, path: ${storageVolume["path"]}");
    }
    
    
3
likes
0
points
17
downloads

Publisher

verified publisherhextools.0xba1.xyz

Weekly Downloads

A new flutter plugin project.

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on disk

Packages that implement disk