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({
'bottom': bottom,
'curve': Curves.linear == curve ? null : CurvesValues.encode(curve),
'duration': duration.inMilliseconds,
'end': end,
'height': height,
'onEnd': onEnd,
'start': start,
'top': top,
'width': width,
'child': child.toJson(),
...args,
});
}