toJson method
Returns a enum instance as a JSON value.
Implementation
@override
String? toJson([O? obj, JsonEncoder? jsonEncoder]) {
obj ??= object;
if (obj == null) {
return null;
}
if (jsonEncoder == null) {
var name = getName(obj);
return name;
} else {
return jsonEncoder.toJson(obj, autoResetEntityCache: false);
}
}