validateBytesInput method

  1. @protected
void validateBytesInput(
  1. Uint8List bytes,
  2. String fileName
)

Validates input for saveBytes.

Implementation

@protected
void validateBytesInput(Uint8List bytes, String fileName) {
  if (bytes.isEmpty) {
    throw const InvalidInputException('File bytes cannot be empty');
  }
  if (fileName.isEmpty) {
    throw const InvalidInputException('File name cannot be empty');
  }
}