validate method

void validate()

Implementation

void validate() {
  if (length < 0 || length > 32) {
    throw Exception('Invalid length for bytes: was $length');
  }
}