assertMaxSize static method
Asserts that size does not exceed maxSize.
Implementation
static void assertMaxSize(
ByteConverter size, {
required ByteConverter maxSize,
String? name,
}) {
if (size.bytes > maxSize.bytes) {
throw ArgumentError.value(
size.bytes,
name ?? 'size',
'must not exceed ${maxSize.display.auto()}',
);
}
}