launch static method

void launch(
  1. BuildContext context, {
  2. required String url,
  3. required String app,
})

Implementation

static void launch(
  BuildContext context, {
  required String url,
  required String app,
}) async {
  try {
    await url_launcher.launch(url);
  } catch (e, s) {
    if (await url_launcher.canLaunch(url)) {
      Log.error(e, s);
    } else {
      SnackBarManager.show(context, text: 'Your device doesn\'t support $app.');
    }
  }
}