Skip to main content

webview_core 1.0.0 copy "webview_core: ^1.0.0" to clipboard
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: flutter and flutter_web_plugins), replacing fragmented federated WebView packages with a single self-contained plugin built on package:flutter/widgets.dart.
  • Android (Kotlin / android.webkit.WebView, minSdk 24, compileSdk 36, AGP 8.x & 9.x Built-in Kotlin compatible): Zero-androidx PlatformViewFactory implementation using UTF-8 loadDataWithBaseURL, synchronous-halt + async-decision NavigationDecision.prevent enforcement, custom-header and non-GET loadRequest support, CSS logical-pixel scroll synchronization, CookieManager integration, @JavascriptInterface channels, and zero deprecated APIs.
  • iOS (Swift / WKWebView, iOS 14.0+): Dual Swift Package Manager (Package.swift) and CocoaPods (webview_core.podspec) layout with PrivacyInfo.xcprivacy, WKWebpagePreferences.allowsContentJavaScript, isOpaque = false backdrop synchronization, weak instance registry for automatic UiKitView unmount cleanup, WKHTTPCookieStore support, and zero deprecated APIs.
  • Linux (C++14 / GTK3 & webkit2gtk-4.1): Compiles cleanly under Flutter's standard cxx_std_14 CMake settings and Ubuntu 22.04 (GLib 2.72.4) headers, combining GtkLayout viewport clipping inside GtkOverlay with automatic Visibility / RenderIndexedStack / Offstage / modal-route and hitTestInView occlusion tracking, destroy-signal lifecycle guards, zoom-lock scripts, and WebKitCookieManager support.
  • macOS (Swift / WKWebView, macOS 11.0+): Dual Swift Package Manager (Package.swift) and CocoaPods (webview_core.podspec) layout with PrivacyInfo.xcprivacy, full setBackgroundColor support via direct InteractiveWKWebView AppKitView hit-testing and drawsBackground = false + CALayer / underPageBackgroundColor backdrop, automatic superview detach cleanup, and zero deprecated APIs.
  • Windows (C++17 / WRL & WebView2LoaderStatic.lib x64/ARM64, /W4 /WX & _HAS_EXCEPTIONS=0 clean): Downloads and verifies the official Microsoft.Web.WebView2 archive directly in CMake without nuget.exe or WIL, compositing ICoreWebView2CompositionController frames via zero-copy DXGI shared GPU textures (FlutterDesktopGpuSurfaceDescriptor, with automatic PixelBufferTexture fallback on software adapters), supporting > 2 MB HTML documents via in-memory WebResourceRequested streams, and forwarding HiDPI bounds, keyboard shortcuts, and pointer modifiers.
  • Web & WebAssembly (dart:js_interop / dart:ui_web, dart2wasm clean): Conditional-import architecture isolating dart:io from Web, featuring pure SDK dart:js_interop HTMLIFrameElement rendering (srcdoc, src, sandbox, Standards-Mode <!DOCTYPE> preservation, CSS rgba() background, and contentWindow-verified postMessage channels).

Compatibility Barrels & Core Types #

  • package:webview_core/webview_core.dart: Primary API exporting WebViewController, WebViewWidget, WebView, WebViewCookieManager, WebViewCookie, JavaScriptMode, LoadRequestMethod, NavigationDelegate, NavigationDecision, NavigationRequest, WebResourceError, WebResourceErrorType, UrlChange, and JavaScriptMessage.
  • package:webview_core/webview_flutter.dart: Compatibility barrel for core webview_flutter APIs.
  • package:webview_core/webview_all.dart: Compatibility barrel for webview_all APIs.
1
likes
160
points
162
downloads

Documentation

API reference

Publisher

verified publisherkeyscope.dev

Weekly Downloads

Zero-dependency native WebView plugin for Flutter across Android, iOS, Linux, macOS, Windows, and Web. Replaces webview_flutter and webview_all with Wasm support.

Repository (GitHub)
View/report issues

Topics

#webview #html #browser #wkwebview #webview2

License

Apache-2.0 (license)

Dependencies

flutter, flutter_web_plugins

More

Packages that depend on webview_core

Packages that implement webview_core