toJson method
Converts an Offset object to a JSON map.
Returns a map with 'x' and 'y' keys containing the offset's dx and dy values.
Example:
final converter = OffsetConverter();
final json = converter.toJson(Offset(10.5, 20.3));
// json == {'x': 10.5, 'y': 20.3}
Implementation
@override
Map<String, dynamic> toJson(Offset offset) {
return {'x': offset.dx, 'y': offset.dy};
}