launchBrowserTab function

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

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

Implementation

Future<String> launchBrowserTab(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("launchBrowserTab", args);
}