calculateModelsSize method
Calculate total size of all models
Implementation
Future<int> calculateModelsSize() async {
_ensureInitialized();
final modelsDir = Directory(path.join(_baseDirectory!.path, 'Models'));
if (!await modelsDir.exists()) return 0;
int totalSize = 0;
await for (final entity in modelsDir.list(recursive: true)) {
if (entity is File) {
totalSize += await entity.length();
}
}
return totalSize;
}