HomeContentId.fromJson constructor

HomeContentId.fromJson(
  1. Map<String, dynamic> json
)

Implementation

HomeContentId.fromJson(Map<String, dynamic> json) {
  sId = json['_id'];
  name = json['name'];
  status = json['status'];
  contentType = json['contentType'];
  displayType = json['displayType'];
  count = json['count'];
  if (json['banners'] != null) {
    banners = <Banners>[];
    json['banners'].forEach((v) {
      banners!.add(new Banners.fromJson(v));
    });
  }
  if (json['promotions'] != null) {
    promotions = <Promotions>[];
    json['promotions'].forEach((v) {
      promotions!.add(new Promotions.fromJson(v));
    });
  }
  sTypename = json['__typename'];
}