validate method
void
validate()
Implementation
void validate() {
if (bytes <= 0) {
throw const FormatException('Camera bytes must be positive.');
}
if (width <= 0 || width > 65535 || height <= 0 || height > 65535) {
throw const FormatException(
'Camera dimensions must be integers from 1 to 65535.',
);
}
if (!capturedAtUtc.isUtc) {
throw const FormatException('Camera capturedAtUtc must be UTC.');
}
if (source != cameraSource) {
throw const FormatException('Camera source must be "camera".');
}
}