import 'package:PiliPlus/models/live/live_feed_index/card_data_list_item.dart'; class LiveSecondData { int? count; List? cardList; LiveSecondData({ this.count, this.cardList, }); factory LiveSecondData.fromJson(Map json) => LiveSecondData( count: json['count'] as int?, cardList: (json['list'] as List?) ?.map((e) => CardLiveItem.fromJson(e as Map)) .toList(), ); Map toJson() => { 'count': count, 'list': cardList?.map((e) => e.toJson()).toList(), }; }