webview_flutter_plus
webview_flutter_plus copied to clipboard
iOS crash
I use it in my project, there will be a crash problem, how to solve this problem?
import 'package:webview_flutter_plus/webview_flutter_plus.dart';
class TopicWebTemplateView extends StatefulWidget {
@override
_TopicWebTemplateViewState createState() => _TopicWebTemplateViewState();
}
class _TopicWebTemplateViewState extends State<TopicWebTemplateView> {
WebViewPlusController _controller;
double _height = 1;
@override
Widget build(BuildContext context) {
return ListView(
children: [
SizedBox(
height: _height,
child: WebViewPlus(
onWebViewCreated: (controller) {
this._controller = controller; // assets/html/test/index.html
controller.loadUrl('https://www.jianshu.com/p/0d0ebb663f55?utm_campaign=haruki'); // assets/html/topic_template/index.html
},
onPageFinished: (url) {
_controller.getHeight().then((double height) {
print("Height: " + height.toString());
setState(() {
_height = height;
});
});
},
// javascriptMode: JavascriptMode.unrestricted,
),
)
],
![截屏2021-01-24 下午12 59 23](https://user-images.githubusercontent.com/22866404/105621797-734bc800-5e46-11eb-9db9-1515f67b057d.png)