launchURL static method

Future<void> launchURL(
  1. String url
)

Opens the provided URL in an external browser.

Implementation

static Future<void> launchURL(String url) async {
  final uri = Uri.parse(url);
  if (!await launchUrl(uri, mode: LaunchMode.externalApplication)) {
    throw Exception('Could not launch $url');
  }
}