Tweet.fromJson constructor
Implementation
factory Tweet.fromJson(Map<String, dynamic> json) => new Tweet(
createdAt: json["created_at"] == null ? null : json["created_at"],
id: json["id"] == null ? null : json["id"].toDouble(),
idStr: json["id_str"] == null ? null : json["id_str"],
quotedStatus: json["quoted_status"] == null
? null
: Tweet.fromJson(json["quoted_status"]),
retweetedStatus: json["retweeted_status"] == null
? null
: Tweet.fromJson(json["retweeted_status"]),
text: json["text"] == null
? (json["full_text"] == null ? null : json["full_text"])
: json["text"],
entities: json["entities"] == null
? const TweetEntities.empty()
: TweetEntities.fromJson(json["entities"]),
extendedEntities: json["extended_entities"] == null
? const TweetEntities.empty()
: TweetEntities.fromJson(json["extended_entities"]),
user: User.fromJson(json["user"]),
isQuoteStatus:
json["is_quote_status"] == null ? null : json["is_quote_status"],
favorited: json["favorited"] == null ? null : json["favorited"],
favoriteCount:
json['favorite_count'] == null ? null : json["favorite_count"],
displayTextRange: json["display_text_range"] == null
? null
: (json["display_text_range"]).cast<int>(),
);