Monday, December 11, 2023
HomeiOS Developmentandroid - Flutter Home windows - The way to open webpage contained...

android – Flutter Home windows – The way to open webpage contained in the app


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:

  1. One open webpage contained in the home windows app?
  2. 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!



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments