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