toJson method
dynamic
toJson()
toJson returns a json compatible object.
Descendants must override this method to expose custom properties.
Implementation
dynamic toJson() {
return <String, dynamic>{'_name': widgetName};
}