toJson method
Converts this and returns a Map representing a JSON object.
This allows for easy integration with dart's JsonEncoder class.
Implementation
@override
@mustBeOverridden
@mustCallSuper
Map toJson() {
final styleName = this.styleName;
var name =
"${styleName != null ? "${styleName.scope} " : ""}"
"${debugName.isNotEmpty ? "debugName.$debugName" : ""}";
return {
if (name.isNotEmpty)
'name': name,
};
}