openUrl static method
Implementation
static Future<void> openUrl(String url, bool useExternalBrowser) async {
final Uri urlFinal = Uri.parse(url);
if (!await launchUrl(
urlFinal,
mode: useExternalBrowser
? LaunchMode.externalApplication
: LaunchMode.platformDefault,
)) {
throw Exception('Could not launch $url');
}
}