launchWithBrowserTab function

Future<String> launchWithBrowserTab (Uri uri, { String redirectUri })

Launches a given url with platform-specific default browser tab.

Implementation

Future<String> launchWithBrowserTab(Uri uri, {String redirectUri}) {
  if (uri.scheme != 'http' && uri.scheme != 'https') {
    throw KakaoClientException(
      'Default browsers only supports URL of http or https scheme.',
    );
  }
  var args = {"url": uri.toString(), "redirect_uri": redirectUri};
  args.removeWhere((k, v) => v == null);
  return _channel.invokeMethod("launchWithBrowserTab", args);
}