Home > Enterprise >  Can not pass the string widget to webview_flutter
Can not pass the string widget to webview_flutter

Time:01-08

I can not pass the widget webDon that is a String. How can I solve it?. Thanks

enter image description here

enter image description here

CodePudding user response:

Just remove the const. Because your displayText is not const. Try this one..

return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: SafeArea(
        child: Scaffold(
          body: WebView(
            initialUrl: displayText,
            javascriptMode: JavascriptMode.unrestricted,
          ),
        ),
      ),
    );
  •  Tags:  
  • Related