tryToLaunchUrl static method
Implementation
static tryToLaunchUrl(String rawUrl,
{Function(String)? onError, String? errorString}) async {
final Uri url = Uri.parse(rawUrl);
if (!await launchUrl(url)) {
onError?.call(errorString ?? 'Could not launch $url');
if (kDebugMode) print('Could not launch $url');
}
}