QWSocialItems.fromJson constructor

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

Implementation

QWSocialItems.fromJson(Map<String, dynamic> json) {
  sId = json['_id'];
  iIndex = json['__index'];
  title = json['title'];
  img = json['img'];
  desc = json['desc'];
  date = json['date'];
  type = json['type'];
  card = json['card'];
  post = json['post'];
  url = json['url'];
  followers = json['followers'];
  verified = json['verified'];
  retweetCount = json['retweetCount'];
  favoriteCount = json['favoriteCount'];
  if (json['medias'] != null) {
    medias = <QWMediaSocial>[];
    json['medias'].forEach((v) {
      medias.add(QWMediaSocial.fromJson(v));
    });
  }
  userUrl = json['userUrl'];
}