Open chauhannaman98 opened 3 years ago
I've also faced the same issue. To avoid calling the function without await. Maybe you face difficulties to write directly use the await inside the widget builder. So write it outside of the builder and call the method.
//Before : Not working
FlutterWebBrowser.openWebPage(url: link);
//After : Workable code
openBrowserTab("https://flutter.io/");
Future<void> openBrowserTab(String link) async {
await FlutterWebBrowser.openWebPage(url: link);
}
I have used the example program to test the plugin here but it didn't work.
The error message after clicking on button reads:
pubspec.yaml
: