I’ve an enterprise Flutter app which was developed primarily for Android & iOS. We added assist for Home windows. At present, the app does the authentication utilizing webview. Under is the present code.
openBrowserOverlay(String url) {
if(Platform.isWindows) {
launchUrl(Uri.parse(url), mode: LaunchMode.inAppWebView);
} else {
FlutterWebBrowser.openWebPage(
url: url,
customTabsOptions: CustomTabsOptions(
instantAppsEnabled: true,
showTitle: true,
urlBarHidingEnabled: true,
),
safariVCOptions: SafariViewControllerOptions(
barCollapsingEnabled: true,
entersReaderIfAvailable: true,
modalPresentationCapturesStatusBarAppearance: true,
dismissButtonStyle: SafariViewControllerDismissButtonStyle.finished,
),
);
}
}
The flutter_inappwebview
package deal presently assist Android & iOS. For Home windows, we used the url_launcher
package deal, nevertheless it opens the webpage in a brand new window.
How can:
- One open webpage contained in the home windows app?
- Conceal the URL Bar when the online web page is opened?
Ideally, a package deal that works throughout platform can be greatest but when its not potential, comfortable to do situation platform particular coding.
Thanks!