StorageDevice class

A single storage device / mount point snapshot (bytes).

Annotations
  • @immutable

Constructors

StorageDevice({required String name, required int capacityBytes, required int freeBytes})
Creates a storage snapshot.
const

Properties

capacityBytes int
Total capacity in bytes.
final
freeBytes int
Free space in bytes.
final
hashCode int
The hash code for this object.
no setterinherited
name String
The device or mount identifier (e.g. /, C:\).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
usagePercent double
Usage as a percentage (0–100); 0 when capacityBytes is 0.
no setter
usedBytes int
Used bytes (capacity minus free).
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
JSON form.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Map<String, dynamic> json) StorageDevice
Decodes from JSON.