openLink method

Future<void> openLink(
  1. BuildContext context,
  2. String url,
  3. String title
)

Implementation

Future<void> openLink(BuildContext context, String url, String title) async {
  if (await canLaunchUrl(Uri.parse(url))) {
    await launchUrl(Uri.parse(url));
  } else {
    TextToast("Could not open link: $url").open(context);
  }
}