TweetVM.fromApiModel constructor
TweetVM.fromApiModel(
- Tweet tweet,
- DateFormat? createdDateDisplayFormat
Implementation
factory TweetVM.fromApiModel(
Tweet tweet, DateFormat? createdDateDisplayFormat) =>
new TweetVM(
createdAt: _createdAt(tweet, createdDateDisplayFormat),
hasSupportedVideo: _hasSupportedVideo(_originalTweetOrRetweet(tweet)),
allEntities: _allEntities(_originalTweetOrRetweet(tweet)),
hasPhoto: _hasPhoto(_originalTweetOrRetweet(tweet)),
hasGif: _hasGif(_originalTweetOrRetweet(tweet)),
tweetLink: _tweetLink(tweet)!,
userLink: _userLink(tweet)!,
text: _text(_originalTweetOrRetweet(tweet)),
textRunes: _runes(_originalTweetOrRetweet(tweet)),
profileUrl: _profileURL(tweet)!,
allPhotos: _allPhotos(_originalTweetOrRetweet(tweet)),
userName: _userName(tweet),
userScreenName: _userScreenName(tweet),
quotedTweet: _quotedTweet(_originalTweetOrRetweet(tweet).quotedStatus,
createdDateDisplayFormat),
retweetedTweet:
_retweetedTweet(tweet.retweetedStatus, createdDateDisplayFormat),
userVerified: _userVerified(tweet),
videoPlaceholderUrl:
_videoPlaceholderUrl(_originalTweetOrRetweet(tweet)),
videoUrls: _videoUrls(_originalTweetOrRetweet(tweet)),
videoAspectRatio: _videoAspectRatio(_originalTweetOrRetweet(tweet)),
favoriteCount: _favoriteCount(tweet),
startDisplayText: _startDisplayText(_originalTweetOrRetweet(tweet)),
endDisplayText: _endDisplayText(_originalTweetOrRetweet(tweet)),
favorited: _favorited(tweet),
);