toJson method
Converts this object to something serializable in JSON.
Implementation
@override
Object toJson() => (focus == null)
? <Object>['zoomBy', amount]
: <Object>[
'zoomBy',
amount,
<double>[focus!.dx, focus!.dy]
];