fromName static method
Retrieves a FragmentTypes instance based on its name (case-insensitive).
Implementation
static FragmentTypes fromName(String? name) {
try {
return values
.firstWhere((element) => element.name == name?.toLowerCase());
} catch (e) {
throw MessageException("unsupported fragment", details: {"type": name});
}
}