Offset offsetFromJson(Map<String, dynamic> data) { final dx = (data["dx"] as num).toDouble(); final dy = (data["dy"] as num).toDouble(); return Offset( dx, dy, ); }