webview_core 1.0.0
webview_core: ^1.0.0 copied to clipboard
Zero-dependency native WebView plugin for Flutter across Android, iOS, Linux, macOS, Windows, and Web. Replaces webview_flutter and webview_all with Wasm support.
1.0.0 #
Initial stable release of webview_core — a unified, zero-dependency native WebView plugin for Flutter across Android, iOS, Linux, macOS, Windows, and Web / WebAssembly (dart2wasm).
Zero-Dependency 6-Platform Architecture #
- Eliminates all external hosted Pub, CocoaPods/SwiftPM, Gradle/Maven, and NuGet CLI dependencies (
dependencies:contains only Flutter SDK packages:flutterandflutter_web_plugins), replacing fragmented federated WebView packages with a single self-contained plugin built onpackage:flutter/widgets.dart. - Android (
Kotlin/android.webkit.WebView, minSdk 24, compileSdk 36, AGP 8.x & 9.x Built-in Kotlin compatible): Zero-androidxPlatformViewFactoryimplementation using UTF-8loadDataWithBaseURL, synchronous-halt + async-decisionNavigationDecision.preventenforcement, custom-header and non-GETloadRequestsupport, CSS logical-pixel scroll synchronization,CookieManagerintegration,@JavascriptInterfacechannels, and zero deprecated APIs. - iOS (
Swift/WKWebView, iOS 14.0+): Dual Swift Package Manager (Package.swift) and CocoaPods (webview_core.podspec) layout withPrivacyInfo.xcprivacy,WKWebpagePreferences.allowsContentJavaScript,isOpaque = falsebackdrop synchronization, weak instance registry for automaticUiKitViewunmount cleanup,WKHTTPCookieStoresupport, and zero deprecated APIs. - Linux (
C++14/GTK3&webkit2gtk-4.1): Compiles cleanly under Flutter's standardcxx_std_14CMake settings and Ubuntu 22.04 (GLib 2.72.4) headers, combiningGtkLayoutviewport clipping insideGtkOverlaywith automaticVisibility/RenderIndexedStack/Offstage/ modal-route andhitTestInViewocclusion tracking,destroy-signal lifecycle guards, zoom-lock scripts, andWebKitCookieManagersupport. - macOS (
Swift/WKWebView, macOS 11.0+): Dual Swift Package Manager (Package.swift) and CocoaPods (webview_core.podspec) layout withPrivacyInfo.xcprivacy, fullsetBackgroundColorsupport via directInteractiveWKWebViewAppKitViewhit-testing anddrawsBackground = false+CALayer/underPageBackgroundColorbackdrop, automatic superview detach cleanup, and zero deprecated APIs. - Windows (
C++17/WRL&WebView2LoaderStatic.libx64/ARM64,/W4 /WX&_HAS_EXCEPTIONS=0clean): Downloads and verifies the officialMicrosoft.Web.WebView2archive directly in CMake withoutnuget.exeorWIL, compositingICoreWebView2CompositionControllerframes via zero-copy DXGI shared GPU textures (FlutterDesktopGpuSurfaceDescriptor, with automaticPixelBufferTexturefallback on software adapters), supporting> 2 MBHTML documents via in-memoryWebResourceRequestedstreams, and forwarding HiDPI bounds, keyboard shortcuts, and pointer modifiers. - Web & WebAssembly (
dart:js_interop/dart:ui_web,dart2wasmclean): Conditional-import architecture isolatingdart:iofrom Web, featuring pure SDKdart:js_interopHTMLIFrameElementrendering (srcdoc,src,sandbox, Standards-Mode<!DOCTYPE>preservation, CSSrgba()background, andcontentWindow-verifiedpostMessagechannels).
Compatibility Barrels & Core Types #
package:webview_core/webview_core.dart: Primary API exportingWebViewController,WebViewWidget,WebView,WebViewCookieManager,WebViewCookie,JavaScriptMode,LoadRequestMethod,NavigationDelegate,NavigationDecision,NavigationRequest,WebResourceError,WebResourceErrorType,UrlChange, andJavaScriptMessage.package:webview_core/webview_flutter.dart: Compatibility barrel for corewebview_flutterAPIs.package:webview_core/webview_all.dart: Compatibility barrel forwebview_allAPIs.