openUri function

Future<void> openUri(
  1. Uri uri
)

Implementation

Future<void> openUri(Uri uri) async {
  if (await canLaunchUrl(uri)) {
    await launchUrl(uri);
  } else {
    throw "Error";
  }
}