validateListOfBytes static method
Implementation
static void validateListOfBytes(List<int> bytes, {String? onError}) {
for (int i = 0; i < bytes.length; i++) {
final int byte = bytes[i];
if (byte < 0 || byte > mask8) {
throw ArgumentError("${onError ?? "Invalid bytes"} at index $i: $byte");
}
}
}