launchLink method

Future<void> launchLink(
  1. String url
)

Implementation

Future<void> launchLink(String url) async {
  if (url.isEmpty) {
    CustomFlashWidget.showFlashMessage(
      type: FlashType.error,
      title: "Error",
      message: 'Couldn\'t launch the external link, Please contact customer support',
    );
    return;
  }
  if (await launchUrl(Uri.parse(url))) {
    log('URl launched $url');
  } else {
    log('Could not launch $url');
  }
}