exec method
Implementation
Future<bool> exec({
required int requiredStorageInGB,
}) async {
try {
final availableStorageInGB =
await _localStorageService.getAvailableStorageInGB();
final hasEnoughSpace = availableStorageInGB >= requiredStorageInGB;
return hasEnoughSpace;
} on ServiceException catch (_) {
throw UsecaseException(
UsecaseErrorType.localStorageCheckError,
UsecaseErrorType.localStorageCheckError.message,
);
} catch (e) {
throw UsecaseException(
UsecaseErrorType.unknown,
UsecaseErrorType.unknown.message,
);
}
}