openLink function

Future<void> openLink(
  1. String url
)

Implementation

Future<void> openLink(String url) async {
  if (await canLaunchUrlString(url)) {
    await launchUrlString(url);
  } else {
    throw "Error";
  }
}