StorageInfo class

Device storage information including internal, external, cache, and data sizes.

Constructors

StorageInfo({required int internalTotal, required int internalFree, required int externalTotal, required int externalFree, required int appCacheSize, required int appDataSize})
API Documentation for StorageInfo.
StorageInfo.fromMap(Map map)
API Documentation for StorageInfo.fromMap.
factory

Properties

appCacheSize int
App cache directory size in bytes.
final
appDataSize int
App data directory size in bytes.
final
externalFree int
Free external storage in bytes.
final
externalTotal int
Total external (SD) storage in bytes. 0 if unavailable.
final
hashCode int
The hash code for this object.
no setterinherited
internalFree int
Free internal storage in bytes.
final
internalFreeFormatted String
Human-readable internal free space (e.g., "12.5 GB").
no setter
internalTotal int
Total internal storage in bytes.
final
internalTotalFormatted String
Human-readable internal total space (e.g., "128.0 GB").
no setter
internalUsage double
Returns internal storage usage as a percentage (0.0 - 1.0).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({int? internalTotal, int? internalFree, int? externalTotal, int? externalFree, int? appCacheSize, int? appDataSize}) StorageInfo
API Documentation for copyWith.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, Object>
API Documentation for toMap.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

formatBytes(int bytes) String
API Documentation for formatBytes.