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