@override Offset? fromJson(Map<String, dynamic>? json) { if (json == null) return null; return Offset( ((json['dx'] ?? 0) as num).toDouble(), ((json['dy'] ?? 0) as num).toDouble(), ); }