Offset jsonToOffset(Map<String, dynamic> data) { return Offset(data['dx'] as double, data['dy'] as double); }