flutter_bridge_webview 0.0.13 flutter_bridge_webview: ^0.0.13 copied to clipboard
A bridge webview Flutter plugin.
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_bridge_webview/flutter_bridge_webview.dart';
void main() => runApp(MaterialApp(home: WebViewExample()));
class WebViewExample extends StatelessWidget {
final Completer<BridgeWebViewController> _controller =
Completer<BridgeWebViewController>();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('BridgeWebView example'),
),
// We're using a Builder here so we have a context that is below the Scaffold
// to allow calling Scaffold.of(context) so we can show a snackbar.
body: Builder(builder: (BuildContext context) {
return BridgeWebView(
initialUrl: 'https://www.microduino.cn',
javascriptMode: JavascriptMode.unrestricted,
onWebViewCreated: (BridgeWebViewController webViewController) {
_controller.complete(webViewController);
},
onPageFinished: (String url) {
print('Page finished loading: $url');
},
);
}),
);
}
}