offlineDiskUsage property
Get total disk usage of downloaded audio in bytes.
Implementation
Future<int> get offlineDiskUsage async {
final dir = await _getAudioDir();
int total = 0;
await for (final entity in dir.list(recursive: true)) {
if (entity is File) total += await entity.length();
}
return total;
}