TweetV1Response.fromJson constructor
TweetV1Response.fromJson(
- Map<String, dynamic> json
)
Implementation
factory TweetV1Response.fromJson(Map<String, dynamic> json) =>
new TweetV1Response(
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
: TweetV1Response.fromJson(json["quoted_status"]),
retweetedStatus: json["retweeted_status"] == null
? null
: TweetV1Response.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"],
replied: json["replied"] == null ? null : json["replied"],
replyCount: json["reply_count"] == null ? null : json["reply_count"],
displayTextRange: json["display_text_range"] == null
? null
: (json["display_text_range"]).cast<int>(),
);