tweet_ui 2.5.0-nullsafety.1 copy "tweet_ui: ^2.5.0-nullsafety.1" to clipboard
tweet_ui: ^2.5.0-nullsafety.1 copied to clipboard

outdated

Show Tweets from a Twitter API JSON on Android and iOS. Support for Tweets with 1-4 photos, Video, GIFs, hashtags, mentions, symbols, urls, quoted Tweets and retweets.

tweet_ui #

Flutter Tweet UI - Flutter package that is inspired by twitter-kit-android. Works on iOS and Android.

Getting Started #

To use this package add it to the pubspec.yaml file:

tweet_ui: <latest_version>

import it:

import 'package:tweet_ui/tweet_ui.dart';

If you want to show tweets with videos: check the video_player installation site.

finally, create a TweetView from a JSON:

TweetView.fromTweet(
    Tweet.fromRawJson(
        jsonFromTwitterAPI
        // {"created_at": "Mon Nov 12 13:00:38 +0000 2018", "id": 1061967001177018368, ...
    )
);

or a CompactTweetView,

CompactTweetView.fromTweet(
    Tweet.fromRawJson(
        jsonFromTwitterAPI
        // {"created_at": "Mon Nov 12 13:00:38 +0000 2018", "id": 1061967001177018368, ...
    )
);

or a EmbeddedTweetView.

EmbeddedTweetView.fromTweet(
    Tweet.fromRawJson(
        jsonFromTwitterAPI
        // {"created_at": "Mon Nov 12 13:00:38 +0000 2018", "id": 1061967001177018368, ...
    )
  darkMode: true,
)

There is also a special QuoteTweetView that is embedded in a TweetView or a CompactTweetView or a EmbeddedTweetView. This depends if a Tweet has a quoted_status value in the JSON.

What tweet view should I create? #

TweetView and CompactTweetView are more customisable, but EmbeddedTweetView looks more modern. Check the screenshots below.

Need more information? Check our wiki pages! #

Colors & styling

Custom callbacks

Custom date format

Video player options

Example of supported view and media types: #

Standard tweet views #

Media type TweetView CompactTweetView EmbeddedTweetView
1 photo img img img
2 photos img img img
3 photos img img img
4 photos img img img
video img img img
GIF img img img

Quoted tweet views #

Media type TweetView CompactTweetView EmbeddedTweetView
1 photo img img img
2 photos img img img
3 photos img img img
4 photos img img img
video img img img
GIF img img img

Sample tweets use real-life tweet ids but for example purposes, their content was changed.


Thanks for contributing: dasmikko, jamesblasco, tristan-vrt, daver123, ercadev, ivanjpg, escamoteur

63
likes
0
pub points
66%
popularity

Publisher

unverified uploader

Show Tweets from a Twitter API JSON on Android and iOS. Support for Tweets with 1-4 photos, Video, GIFs, hashtags, mentions, symbols, urls, quoted Tweets and retweets.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

better_player, cached_network_image, flutter, html_unescape, intl, photo_view, url_launcher, video_player

More

Packages that depend on tweet_ui