byName static method
- String? name
Gets a possible HttpAuthResponseAction instance value with name name.
Goes through HttpAuthResponseAction.values looking for a value with
name name, as reported by HttpAuthResponseAction.name.
Returns the first value with the given name, otherwise null.
Implementation
static HttpAuthResponseAction? byName(String? name) {
if (name != null) {
try {
return HttpAuthResponseAction.values.firstWhere(
(element) => element.name() == name,
);
} catch (e) {
return null;
}
}
return null;
}