toJsonString method
Converts the object to a JSON-formatted string.
This method calls toJson to get a JSON-compatible map
and then encodes it as a JSON-formatted string.
final jsonString = myObject.toJsonString();
Implementation
String toJsonString() => json.encode(toJson());