fromValue static method
Implementation
static TopLevelBlockEnum? fromValue(dynamic value) {
if (value is BLOCKS) {
return items.firstWhereOrNull((item) => item.value == value);
}
if (value is String) {
return items.firstWhereOrNull((item) => item.value.value == value);
}
return null;
}