safeLaunch function

Future<void> safeLaunch(
  1. String urlString
)

Implementation

Future<void> safeLaunch(String urlString) async {
  if (await canLaunch(urlString)) {
    await launch(urlString);
  } else {
    errorToast(S.current.couldnt_open_this_url);
  }
}