class FeedResponse { final List inscriptions; FeedResponse({required this.inscriptions}); factory FeedResponse.fromJson(Map json) { final List inscriptionsJson = json['_links']['inscriptions'] as List; final List inscriptions = inscriptionsJson .map((json) => InscriptionLink.fromJson(json as Map)) .toList(); return FeedResponse(inscriptions: inscriptions); } } class InscriptionLink { final String href; final String title; InscriptionLink({required this.href, required this.title}); factory InscriptionLink.fromJson(Map json) { return InscriptionLink( href: json['href'] as String ?? '', title: json['title'] as String ?? '', ); } }