launchInBrowser static method

Future<void> launchInBrowser(
  1. String url
)

Implementation

static Future<void> launchInBrowser(String url) async {
  final uri = Uri.tryParse(url);
  if (uri != null && await canLaunchUrl(uri)) {
    await launchUrl(uri, mode: LaunchMode.externalApplication);
  } else {
    toastError("Could not launch $url");
  }
}