New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can it be used with flutter_webview_plugin? #9
Comments
Sorry, what is not work for you? Can you please be more details? |
Sorry, u can't. My plugin used different web view instance. |
It will be awesome if support display.And thank you. |
Notify u guys when it is ready for displaying |
Great plugin! if only could display, would be much better, thanks for the effort anyway |
it cant work for me.
`import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
import 'package:interactive_webview/interactive_webview.dart';
const String url = 'http://192.168.1.3:3000';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or simply save your changes to "hot reload" in a Flutter IDE).
// Notice that the counter didn't reset back to zero; the application
// is not restarted.
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.
// This class is the configuration for the state. It holds the values (in this
// case the title) provided by the parent (in this case the App widget) and
// used by the build method of the State. Fields in a Widget subclass are
// always marked "final".
final String title;
@OverRide
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State {
final _webView = new InteractiveWebView();
@OverRide
void initState() {
super.initState();
init();
}
init() async {
_webView.stateChanged.listen((state) {
print('------------------------');
print(state);
});
_webView.didReceiveMessage.listen((message) {
print('-----------------------');
print(message.data.toString());
});
_webView.loadUrl(url);
}
@OverRide
Widget build(BuildContext context) {
return Scaffold(
body: Padding(
padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
child: Column(
children: [
Row(
children: [
RaisedButton(
onPressed: () async {},
child: Text('back'),
),
],
),
Expanded(
child: WebviewScaffold(
url: url,
clearCache: true,
))
],
),
),
);
}
}
`
The text was updated successfully, but these errors were encountered: