Map<String, Object?> toJson() { final data = <String, Object?>{}; data['type'] = type; return data; }