import 'package:url_launcher/url_launcher.dart';

class LauncherUrlUtil {
  LauncherUrlUtil._();

  static Future<void> launchHttpUrl(String url,
      {LaunchMode mode = LaunchMode.platformDefault}) async {
    final uri = Uri.parse(url);
    if (!await canLaunchUrl(uri)) {
      throw Exception('Could not launch $url');
    }
    launchUrl(uri, mode: mode);
  }
}
