toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() {
  var data = <String, dynamic>{};
  data['_id'] = sId;
  data['__index'] = iIndex;
  data['title'] = title;
  data['img'] = img;
  data['desc'] = desc;
  data['date'] = date;
  data['type'] = type;
  data['card'] = card;
  data['post'] = post;
  data['url'] = url;
  data['followers'] = followers;
  data['verified'] = verified;
  data['retweetCount'] = retweetCount;
  data['favoriteCount'] = favoriteCount;
  if (medias != null) {
    data['medias'] = medias.map((v) => v.toJson()).toList();
  }
  data['userUrl'] = userUrl;
  return data;
}