class JoinField { final List? docs; final bool? hasNextPage; final int? totalDocs; const JoinField({this.docs, this.hasNextPage, this.totalDocs}); factory JoinField.fromJson(Map json) { final raw = json['docs']; final list = (raw is List) ? raw.map((e) => e as String).toList() : null; return JoinField( docs: list, hasNextPage: json['hasNextPage'] as bool?, totalDocs: json['totalDocs'] as int?, ); } Map toJson() { return {'docs': docs, 'hasNextPage': hasNextPage, 'totalDocs': totalDocs}; } }