openURL static method

dynamic openURL(
  1. String url
)

Implementation

static openURL(String url) async {
  if (await canLaunch(url)) {
    await launch(url);
  } else {
    throw 'Could not launch $url';
  }
}