openUrl static method

Future<void> openUrl(
  1. String url
)

Implementation

static Future<void> openUrl(String url) async {
  try {
    if (await canLaunchUrl(Uri.parse(url))) {
      await launchUrl(Uri.parse(url), mode: LaunchMode.externalApplication);
    }
  } catch (e) {
    debugPrint(e.toString());
  }
}