StorageSpace constructor
StorageSpace({})
Implementation
StorageSpace({
required this.free,
required this.total,
required this.lowOnSpaceThreshold,
required this.fractionDigits,
}) {
used = total - free;
freeSize = _toHuman(free, fractionDigits);
totalSize = _toHuman(total, fractionDigits);
usedSize = _toHuman(used, fractionDigits);
usageValue = used / total;
usagePercent = (usageValue * 100).round();
lowOnSpace = free <= lowOnSpaceThreshold;
}