launchWebView method
Implementation
Future<void> launchWebView(String url, BuildContext context) async {
if (await canLaunch(url)) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => WebViewExample(
url: url,
transactionSuccessfullCallback:
transactionSuccessfullCallback,
transactionFailureCallback: transactionFailureCallback,
)),
);
} else {
throw 'Could not lunch $url';
}
}