disk_space_2
1.0.13, released 4 months ago by an unverified publisher
Get free and total disk space information on Android, iOS, Windows and Linux devices.
What it does
Provides an easy way to retrieve free and total disk space information on Android, iOS, Windows, and Linux devices. Allows fetching disk space either generally or for a specific directory path.
AI-written summary of version 1.0.13, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to check available storage before downloading large files or caching data.
- You want to display device storage information to the user.
Skip it when
- You need complex file system manipulation beyond reading disk space statistics.
Strengths
- Supports multiple platforms including Android, iOS, Windows, and Linux.
- Simple API to fetch free and total disk space or query space for a specific path.
Weaknesses
- Provides only basic space metrics rather than a full storage management utility suite.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
No specific native configuration steps documented.
import 'package:disk_space_2/disk_space_2.dart';
void main() async {
double? freeDiskSpace = await DiskSpace.getFreeDiskSpace;
print('Free disk space: $freeDiskSpace');
double? totalDiskSpace = await DiskSpace.getTotalDiskSpace;
print('Total disk space: $totalDiskSpace');
}Alternatives
Packages that do the same job and could replace disk_space_2.
- storage_space
Get device storage space and app-specific storage usage with readable sizes.
78Compare - device_info_plus
Provides detailed information about the current device, make, model, and OS version.
93Compare - carrier_info
Gets network type, carrier codes, and SIM info on Android and iOS.
86Compare - platform_device_id
Get unique device IDs across Android, iOS, Windows, Linux, macOS, and Web.
50Compare
Works with
Packages commonly used together with disk_space_2: ones it builds on, ones built on it, and its own family.