webview_flutter
4.14.1, released 4 months ago by flutter.dev
Flutter plugin that embeds a native WebView widget.
WASM-readyRock solid
What it does
Provides a WebView widget backed by the platform’s native webview. It exposes a controller for navigation, JavaScript, and platform‑specific features.
AI-written summary of version 4.14.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- Need to display web content inside a Flutter app
- Require full control over navigation and JavaScript execution
- Need platform‑specific features like custom headers or media playback
Skip it when
- You only need a simple static web page
- You prefer a pure Dart webview implementation
Strengths
- Native performance and full feature set
- Supports Android, iOS, macOS
- Rich controller API for navigation, cookies, and JavaScript
Weaknesses
- Requires platform implementation packages
- Android SDK 24+ only
- No support for web platform
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 3
Add webview_flutter, webview_flutter_android, and webview_flutter_wkwebview to pubspec. Import platform packages for Android/iOS/macOS features. No build_runner needed.
```dart
final controller = WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..loadRequest(Uri.parse('https://flutter.dev'));
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('WebView')),
body: WebViewWidget(controller: controller),
);
}
```Alternatives
Packages that do the same job and could replace webview_flutter.
- flutter_rating
A customizable star rating widget for Flutter.
50Compare
Works with
Packages commonly used together with webview_flutter: ones it builds on, ones built on it, and its own family.
- webview_flutter_wkwebviewwebview_flutter depends on itA Flutter plugin providing a WebView widget based on Apple's WKWebView control.
- webview_flutter_androidwebview_flutter depends on itAndroid implementation of the webview_flutter plugin providing a WebView widget.
- webview_flutter_webSame familyWebView widget implementation for Flutter web.
- google_mobile_adsBuilt on webview_flutterFlutter plugin to show AdMob banner, interstitial, rewarded and native ads.
- fwfh_webviewBuilt on webview_flutterWidgetFactory extension to render IFRAME elements using the official WebView plugin.
- youtube_player_iframeBuilt on webview_flutterFlutter widget for embedding YouTube videos via the official iFrame API
- model_viewer_plusBuilt on webview_flutterA Flutter widget for rendering interactive 3D models in glTF and GLB formats.
- webview_flutter_plusBuilt on webview_flutterExtension of webview_flutter to load local HTML, CSS, and JS from assets or strings via a local server.