valueOf static method
Return the {status-code: Series} enum constant for the supplied status code. @param statusCode the HTTP status code (potentially non-standard) @return the {status-code: Series} enum constant for the supplied status code @throws IllegalArgumentException if this enum has no corresponding constant
Implementation
static Series valueOf(int statusCode) {
Series? series = resolve(statusCode);
if (series == null) {
throw StateError('No matching constant for [$statusCode]');
}
return series;
}