LaunchURL function

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

Implementation

Future<void> LaunchURL({required String url}) async {
    try {
      if (!await launchUrl(Uri.parse(url), browserConfiguration: const BrowserConfiguration(),mode: LaunchMode.platformDefault)) {
        throw 'Could not launch $url';
      }
    } catch (e) {
      //mj
    }
  }