launchURL static method

void launchURL(
  1. String urlString, {
  2. LaunchMode? mode,
})

Implementation

static void launchURL(
  String urlString, {
  LaunchMode? mode,
}) async {
  if (await canLaunchUrlString(urlString)) {
    if (mode == null && !kIsWeb) {
      mode = LaunchMode.externalApplication;
    }
    await launchUrlString(
      urlString,
      mode: mode ?? LaunchMode.platformDefault,
    );
  } else {
    LoggerService.logInfo('Utils launchURL: could not launch string: $urlString');
  }
}