tweet_webview 0.1.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new52

TweetWebView for Flutter

Build Status codecov pub package

TweetWebView is a Flutter widget to easily display a Twitter tweet in a WebView widget using webview_flutter.

Example 1

Display a single tweet in a TweetWebView widget using the tweet URL.

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Tweet WebView Example 1'),
      ),
      body: TweetWebView.tweetUrl("https://twitter.com/Interior/status/463440424141459456"),
    );
  }
}

<img src="screenshots/example1.png" width="300" alt="Screenshot of list of tweets" style="border:1px solid black">

Example 2

Display a single tweet in a TweetWebView widget using the tweet ID.

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Tweet WebView Example 2'),
      ),
      body: TweetWebView.tweetID('463440424141459456'),
    );
  }
}

<img src="screenshots/example2.png" width="300" alt="Screenshot of list of tweets" style="border:1px solid black">

Example 3

Display a list of tweets in TweetWebView widgets using the tweet IDs.

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Tweet WebView Example 3'),
      ),
      body: _buildBody(),
    );
  }

  Widget _buildBody() {
    final tweets = ['1065424382292566017', '1068219397293125633', '1068551446029832192', '1065362290512293888'];

    final list = ListView.builder(
      scrollDirection: Axis.vertical,
      padding: EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 0.0),
      itemCount: tweets.length,
      itemBuilder: (context, index) {
        var tweetID = tweets[index];
        return Card(
          child: TweetWebView.tweetID(tweetID),
        );
      },
    );

    final container = Container(
        color: Colors.black26,
        child: Center(child: list)
    );

    return container;

  }
}

<img src="screenshots/example3.png" width="300" alt="Screenshot of list of tweets">

Contributing

All comments and pull requests are welcome.

0.1.0

  • Initial Open Source release.

example/README.md

tweet_webview_example

Demonstrates how to use the twitter_webview widget.

Getting Started

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  tweet_webview: ^0.1.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:tweet_webview/tweet_webview.dart';
  
Version Uploaded Documentation Archive
0.1.0 Dec 1, 2018 Go to the documentation of tweet_webview 0.1.0 Download tweet_webview 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
3
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
52
Learn more about scoring.

We analyzed this package on Dec 8, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
http ^0.12.0 0.12.0
path_provider ^0.4.1 0.4.1
webview_flutter ^0.0.1 0.0.1+1 0.1.0+1
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
meta 1.1.6
path 1.6.2
sky_engine 0.0.99
source_span 1.4.1
string_scanner 1.0.4
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test