url static method

Future<void> url({
  1. required String? url,
})

Implementation

static Future<void> url({
  required String? url,
}) async {
  final urlPath = Uri.parse(url ?? '');
  if (await canLaunchUrl(urlPath)) {
    await launchUrl(
      urlPath,
      mode: LaunchMode.externalApplication,
    );
  } else {
    throw 'Could not launch $url';
  }
}