@override Map<String, dynamic>? toJson(Offset? object) { if (object == null) return null; return <String, dynamic>{ 'dx': object.dx, 'dy': object.dy, }; }