tweet_webview 0.2.2 tweet_webview: ^0.2.2 copied to clipboard
A Flutter widget to display a Twitter tweet in a WebView widget using webview_flutter.
/*
* Copyright (c) 2018 Larry Aasen. All rights reserved.
*/
import 'package:flutter/material.dart';
import 'package:tweet_webview/tweet_webview.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Tweet WebView Example 1',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key}) : super(key: key);
@override
_MyHomePageState createState() => _MyHomePageState();
}
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/1172258799576653825"),
);
}
}