fromJson method
Implementation
@override
MethodType fromJson(Object json) {
switch (json) {
case _mapName:
return MethodType.map;
case _maybeMapName:
return MethodType.maybeMap;
default:
if (defaultValue != null) return defaultValue!;
throw Exception('Unknown field: $json');
}
}