launchBrowserTab function
플랫폼별 기본 브라우저로 URL 실행
URL을 팝업으로 열고싶을 때 popupOpen
사용. 웹에서만 사용 가능
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);
}