Map<String, dynamic> offsetToJSON(Offset offset) { return <String, dynamic>{ 'x': offset.dx, 'y': offset.dy, }; }