validateSelectionCount static method
Implementation
static void validateSelectionCount(int count, {int? maxAllowed}) {
if (count > FileConstants.hardMaxSelection) {
throw const CloudMediaSelectionLimitExceededException();
}
final limit = maxAllowed ?? FileConstants.defaultMaxSelection;
if (count > limit) {
throw CloudMediaSelectionLimitExceededException(
'Selected $count files exceeds maximum of $limit.');
}
}