webview_flutter_plus icon indicating copy to clipboard operation
webview_flutter_plus copied to clipboard

iOS crash

Open paintingStyle opened this issue 3 years ago • 0 comments

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

paintingStyle avatar Jan 24 '21 05:01 paintingStyle