I want to close the webview in my flutter app when the user clicks on a button which is present in the webview
Here is the code which displays the webview
class WebViewApp extends StatefulWidget {
@override
_WebViewAppState createState() => _WebViewAppState();
}
class _WebViewAppState extends State<WebViewApp> {
@override
Widget build(BuildContext context) {
return WebviewScaffold(url: 'https://google.com',
appBar: AppBar(
title: Text('Test'),
centerTitle: true,
backgroundColor: kBlue,
leading: BackButton(
onPressed: (){
Router.navigator.pop();
},
)
),
);
}
}

