openURL static method

Future<bool> openURL(
  1. String url, [
  2. LaunchMode mode = LaunchMode.externalApplication
])

Implementation

static Future<bool> openURL(
  String url, [
  LaunchMode mode = LaunchMode.externalApplication,
]) async {
  try {
    final success = await launchUrlString(url, mode: mode);
    if (!success) {
      throw ReownCoreError(code: 3000, message: 'Can not open $url');
    }
    return true;
  } catch (_) {
    throw ReownCoreError(code: 3001, message: 'Can not open $url');
  }
}