toJson method
Abstract function that concrete classes must implement. This must encode the internal data model to a JSON compatible representation.
While not required, it is suggested to call removeNull before returning.
Implementation
@override
Map<String, dynamic> toJson() {
return JsonClass.removeNull({
'addAutomaticKeepAlives': addAutomaticKeepAlives,
'addRepaintBoundaries': addRepaintBoundaries,
'addSemanticIndexes': addSemanticIndexes,
'findChildIndexCallback': findChildIndexCallback,
'gridDelegate': gridDelegate,
'semanticIndexCallback': semanticIndexCallback,
'semanticIndexOffset':
0 == semanticIndexOffset ? null : semanticIndexOffset,
'children': JsonClass.maybeToJsonList(children),
...args,
});
}