fromJson method
Returns an Enum instance from json
.
See from.
Implementation
@override
O fromJson(Object? json) {
if (json == null) {
throw StateError("Null JSON for enum: $enumName");
}
var o = from(json);
if (o == null) {
throw StateError("No enum `$enumName` for JSON: $json");
}
return o;
}