# launchBrowserTab function Null safety

Future<String> launchBrowserTab(

1. Uri uri,
2. {String? redirectUri}

)

플랫폼별 기본 브라우저로 URL 실행

## Implementation

    Future<String> launchBrowserTab(Uri uri, {String? redirectUri}) async {
      if (uri.scheme != CommonConstants.http &&
          uri.scheme != CommonConstants.scheme) {
        throw KakaoClientException(
          'Default browsers only supports URL of http or https scheme.',
        );
      }
      var args = {
        CommonConstants.url: uri.toString(),
        CommonConstants.redirectUri: redirectUri
      };
      args.removeWhere((k, v) => v == null);
      final redirectUriWithParams = await _channel.invokeMethod<String>(
          CommonConstants.launchBrowserTab, args);

      if (redirectUriWithParams != null) return redirectUriWithParams;
      throw KakaoClientException(
          "OAuth 2.0 redirect uri was null, which should not happen.");
    }