openWebPage method

  1. @override
Future<bool> openWebPage(
  1. Uri url
)
override

Called when the renew interaction uses an HTML web page.

You should present the URL in a Chrome Custom Tab and terminate the function when the web page is dismissed by the user.

Implementation

@override
Future<bool> openWebPage(Uri url) async {
  if (await canLaunch(url.toString())) {
    return launch(url.toString());
  } else {
    throw 'Could not launch $url';
  }
}