launchBrowserTab function
- Uri uri, {
- bool popupOpen = false,
KO: 기본 브라우저로 URL 실행
popupOpen
이 true면 URL을 팝업에서 실행. popupOpen
은 웹에서만 사용 가능
EN: Launchs a URL with the default browser
Execute the URL with a pop-up if popupOpen
is set true. popupOpen
is only available on the web
Implementation
Future launchBrowserTab(Uri uri, {bool popupOpen = false}) async {
if (uri.scheme != CommonConstants.http &&
uri.scheme != CommonConstants.scheme) {
throw KakaoClientException(
ClientErrorCause.notSupported,
'Default browsers only supports URL of http or https scheme.',
);
}
final args = {
CommonConstants.url: uri.toString(),
CommonConstants.isPopup: popupOpen,
};
await _methodChannel.invokeMethod<String>(
CommonConstants.launchBrowserTab, args);
}