serialize method Null safety
override
This method is meant to be overridden if data in addition to finder is serialized to JSON.
Example:
Map<String, String> toJson() => super.toJson()..addAll({
'foo': this.foo,
});
Implementation
@override
Map<String, String> serialize() => super.serialize()..addAll(<String, String>{
'dx': '$dx',
'dy': '$dy',
'duration': '${duration.inMicroseconds}',
'frequency': '$frequency',
});