openUri static method

Future<void> openUri(
  1. String? url
)

Implementation

static Future<void> openUri(String? url) async {
  if (await canLaunch(url!)) {
    await launch(url);
  } else {
    Future.error('Could not launch $url');
  }
}