Skip to main content

advanced_webview 0.6.0 copy "advanced_webview: ^0.6.0" to clipboard
advanced_webview: ^0.6.0 copied to clipboard

A simple yet feature-rich Flutter WebView plugin for Android and iOS. One typed Dart API that behaves the same on both platforms.

Changelog #

All notable changes to this project are documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased #

0.6.0 - 2026-11-05 #

  • Reword the package description and README introductions around the product ("simple yet feature-rich", one typed Dart API with the same behaviour on both platforms) instead of implementation details.

  • Add AndroidWebViewSettings.geolocationEnabled (default true, as before), which switches navigator.geolocation off for the page (WebSettings.setGeolocationEnabled). iOS has no equivalent. A location is still only shared when the app holds the location permission and onPermissionRequest grants it.

  • Add IOSWebViewSettings.allowsLinkPreview (default true, as before), which turns off the link preview shown when the user presses and holds a link (WKWebView.allowsLinkPreview). Android has no equivalent.

  • Add IOSWebViewSettings.contentMode and WebViewContentMode (recommended, mobile, desktop), which choose the mobile or desktop version of sites on iOS (WKWebpagePreferences.preferredContentMode). It takes effect on the next navigation. Android has no equivalent.

  • Add IOSWebViewSettings.applicationNameForUserAgent (creation only), which appends a token such as MyApp/1.0 to the default iOS user agent (WKWebViewConfiguration.applicationNameForUserAgent) without replacing it. Android has no equivalent; use WebViewSettings.userAgent there.

  • Align the English and Japanese README introductions and package description with the GitHub repository description.

  • Move the design rationale to ARCHITECTURE.md, refresh its guidance, and point package documentation to the published guide site.

0.5.0 - 2026-11-02 #

  • Add AdvancedWebViewController.onConsoleMessage, which reports the page's console.debug, log, info, warn and error calls as WebViewConsoleMessage (level, text, and on Android the source URL and line number). Android uses WebChromeClient.onConsoleMessage; iOS wraps the console methods with a user script injected into every frame, so the source location is null there.

  • Breaking: platform-specific settings moved out of WebViewSettings into two new classes, passed as WebViewSettings.android and WebViewSettings.ios. The other platform ignores them. Defaults are unchanged.

    • AndroidWebViewSettings: supportZoom, passkeysEnabled, domStorageEnabled, allowFileAccess, allowContentAccess, mixedContentMode.
    • IOSWebViewSettings: allowsInlineMediaPlayback, allowsBackForwardNavigationGestures, incognito.

    Before: WebViewSettings(passkeysEnabled: true, incognito: true). After: WebViewSettings(android: AndroidWebViewSettings(passkeysEnabled: true), ios: IOSWebViewSettings(incognito: true)).

0.4.0 - 2026-11-02 #

  • Add the Android settings WebViewSettings.domStorageEnabled (default true, as before), allowFileAccess, allowContentAccess and mixedContentMode (WebViewMixedContentMode). iOS ignores them. Behaviour change: allowFileAccess and allowContentAccess now default to false (previously the WebView defaults applied: content:// access was on, and file:// access depended on the app's target SDK), and mixed content is explicitly blocked. Set them to true to restore the old behaviour.

  • Add AdvancedWebViewController.onLongPress (touch position in logical pixels) and hitTest, which reports the link and/or image under a point (WebViewHitTestResult). Together they let apps build a custom context menu. hitTest uses document.elementFromPoint, so it is main-frame only and identical on both platforms; the platform's own long-press behaviour is not suppressed.

  • Add AdvancedWebViewController.printPage, which opens the system print dialog for the current page (PrintManager on Android, UIPrintInteractionController on iOS).

  • Add AdvancedWebViewController.saveState and restoreState, which snapshot and restore the back/forward history and scroll position as opaque bytes (WebView.saveState on Android, WKWebView.interactionState on iOS). Snapshots only work on the platform that created them.

  • Add scrolling: AdvancedWebViewController.scrollTo, scrollBy, scrollPosition and the onScrollChanged callback. Offsets are logical pixels on both platforms (WebView.scrollTo / setOnScrollChangeListener on Android, UIScrollView.contentOffset on iOS).

0.3.0 - 2026-11-02 #

  • Add WebViewSettings.pullToRefreshEnabled: pulling down from the top reloads the page with the platform's refresh indicator (SwipeRefreshLayout on Android, UIRefreshControl on iOS). On Android the platform view is now a SwipeRefreshLayout that contains the WebView.

  • Add find-in-page: AdvancedWebViewController.findText (returns a FindResult) and clearMatches. Android uses WebView.findAllAsync / findNext; iOS uses WKWebView.find and reports only whether a match was found (no count).

  • Add AdvancedWebViewController.takeScreenshot, which returns a PNG of the visible area (WebView.draw on Android, WKWebView.takeSnapshot on iOS).

  • Add WebViewSettings.incognito (iOS only, creation only): the WebView uses WKWebsiteDataStore.nonPersistent(). Ignored on Android, whose WebView shares data across the app.

  • Add WebViewSettings.javaScriptCanOpenWindowsAutomatically (default true, as before), scrollbarsVisible and overScrollEnabled.

  • Add WebViewSettings.cacheMode and WebViewCacheMode. Android sets WebSettings.setCacheMode for every load; iOS applies the cache policy to requests started with loadUrl.

  • Add WebViewSettings.textZoom (percent; Android scales text only, iOS scales the page with WKWebView.pageZoom) and WebViewSettings.minimumFontSize.

  • Add WebViewSettings.allowsBackForwardNavigationGestures (iOS only, swipe to go back/forward) and WebViewSettings.inspectable (Safari Web Inspector on iOS; WebView.setWebContentsDebuggingEnabled on Android, which is process-wide).

0.2.0 - 2026-11-01 #

  • Add AdvancedWebViewController.onSslError and onHttpAuthRequest (SslError, SslErrorDecision, HttpAuthRequest, HttpAuthCredentials). Certificate errors are still refused unless the callback returns proceed; HTTP authentication is cancelled unless the callback returns credentials.

  • Add AdvancedWebViewController.onDownloadStart and DownloadRequest: the WebView reports downloads (attachments, files it cannot show, download links) instead of saving them, so the app decides how to fetch the file. Android uses WebView.setDownloadListener; iOS cancels the WKNavigationResponse / WKNavigationAction and reports it.

  • Add AdvancedWebViewController.onPermissionRequest to decide whether a page may use the camera, microphone or location (PermissionRequest, PermissionResource, PermissionDecision). Without a callback every request is denied. On Android the plugin also asks for the runtime permission after you grant; geolocation is Android only because WebKit has no delegate for it.

  • Add JavaScript handlers with return values: the javaScriptHandlers constructor parameter and window.advanced_webview.callHandler(name, ...args), which returns a promise settled with the Dart handler's result (or rejected when it throws). The global is window.advanced_webview by default; javaScriptHandlerObjectName renames it. Android needs WEB_MESSAGE_LISTENER.

0.1.0 - 2026-10-31 #

First release on pub.dev.

  • Raise the minimum Flutter SDK to 3.47.8 (Dart 3.13.7), the version the plugin is built and tested with.
  • Android: disabling passkeysEnabled now resets WebAuthn support after it was enabled.
  • iOS: getCookies matches cookie paths at slash boundaries instead of arbitrary prefixes.
  • Clarify navigation and JavaScript channel trust boundaries in English and Japanese, and document app setup requirements.
  • Add WebViewSettings.passkeysEnabled to enable WebAuthn / passkeys on Android (WebSettingsCompat.setWebAuthenticationSupport). iOS needs no setting; the app must have the Associated Domains webcredentials entitlement.
  • Android: <input type="file"> now opens the system file picker (it did nothing before). iOS already used WebKit's built-in picker.
  • Add AdvancedWebViewController.onNewWindow for window.open and target="_blank". Without it, the URL now loads in the same WebView on both platforms (previously nothing happened on iOS).
  • CI: lock GitHub Actions dependencies with gh actions-lock (.github/workflows/actions.lock pins every action, including transitive ones, to a commit SHA), verify it in the new verify-lockfile workflow, and reference actions by exact release tag.
  • Add user scripts: UserScript, the userScripts constructor parameter, and AdvancedWebViewController.addUserScript / removeAllUserScripts. Android uses androidx.webkit (DOCUMENT_START_SCRIPT).
  • Add cookie management: AdvancedWebViewController.setCookie, getCookies and clearCookies with the WebViewCookie type. On Android getCookies only reports name and value.
  • Docs site: pin npm dependencies to exact versions and harden installs against supply-chain attacks (website/.npmrc, website/bunfig.toml: no lifecycle scripts, 7-day minimum release age, frozen lockfile, Dependabot cooldown).
  • Rename the package from flutter_mobile_webview to advanced_webview (Dart package, entry library package:advanced_webview/advanced_webview.dart, Android package/namespace, iOS module and Pigeon channel names) and the public classes from MobileWebView / MobileWebViewController to AdvancedWebView / AdvancedWebViewController.
  • iOS: raise the minimum iOS version to 18.0.
  • iOS: run evaluateJavaScript on the main thread; it could hang when called off it.
  • Make README.md English and move the Japanese README to README.ja.md.
  • Add MIT license, community health files, issue/PR templates and pub.dev metadata.
  • Pin Flutter 3.47.8 with mise (mise.toml); CI uses the same version.
  • Android: detach the WebView from its previous container when a controller is shown by a new AdvancedWebView, so re-attaching a controller does not fail.
  • iOS: app-initiated loads (loadUrl, loadHtmlString, reload, goBack, goForward) no longer reach onNavigationRequest, matching Android.
  • Add native unit tests (Robolectric on Android, XCTest on iOS) and run the integration tests on an Android emulator and an iOS simulator in CI.
  • Lint and format native code in CI: ktlint for Kotlin and swift-format for Swift (Pigeon-generated files are excluded).
  • iOS: support both Swift Package Manager and CocoaPods, and ship a privacy manifest (PrivacyInfo.xcprivacy) with either. CI builds the example app with each.
  • Add AI agent configuration (AGENTS.md, APM with shared skills from imk1t/apm-shared).

0.0.1 #

  • Initial scaffold: Pigeon-based platform contract, Android (Kotlin) and iOS (Swift) implementations, and an example app.
0
likes
0
points
1.46k
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

A simple yet feature-rich Flutter WebView plugin for Android and iOS. One typed Dart API that behaves the same on both platforms.

Repository (GitHub)
View/report issues

Topics

#webview #browser #pigeon #android #ios

License

unknown (license)

Dependencies

flutter, meta

More

Packages that depend on advanced_webview

Packages that implement advanced_webview