web_browser
0.7.4, released 4 years ago by dint.dev
A Flutter widget that displays web pages with built‑in navigation and sharing UI.
What it does
Provides a Browser widget built on webview_flutter, adding back/forward/refresh buttons, URL sharing, error handling, and optional Cupertino or Material designs. It also offers helpers to clear cookies, cache and local storage.
AI-written summary of version 0.7.4, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need an in‑app web view with ready‑made navigation controls
- You want a cross‑platform solution that works on mobile, web and desktop
- You prefer a widget that adapts its look to Material or Cupertino automatically
Skip it when
- You only need a plain WebView without extra UI
- You require heavy custom navigation logic not covered by the provided controls
- You need a lightweight dependency and want to avoid pulling in multiple webview_flutter variants
Strengths
- Provides ready‑made navigation bar and sharing UI
- Works on Android, iOS, web and desktop via webview_flutter plugins
- Supports easy cache and cookie clearing
- Automatic Material/Cupertino theming
Weaknesses
- Adds extra dependency weight on top of webview_flutter
- Limited customization of the navigation bar compared to building your own
- Relies on webview_flutter plugins, so platform bugs may propagate
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 6
import 'package:flutter/material.dart';
import 'package:web_browser/web_browser.dart';
void main() {
runApp(const MaterialApp(
home: Scaffold(
body: SafeArea(
child: Browser(initialUriString: 'https://flutter.dev/'),
),
),
));
}Alternatives
Packages that do the same job and could replace web_browser.
- webviewx_plus
Cross‑platform webview widget using webview_flutter for mobile and iframe for web with JS interop
53Compare - android_gesture_exclusion
Flutter plugin to exclude Android system gesture navigation in specific UI areas.
50Compare - flutter_full_pdf_viewer_null_safe
A Flutter plugin to display PDF files on Android and iOS.
48Compare
Works with
Packages commonly used together with web_browser: ones it builds on, ones built on it, and its own family.
- cupertino_iconsweb_browser depends on itAsset package providing Cupertino icon font for Flutter
- share_plusweb_browser depends on itShare text, files, or URIs via native share dialogs on mobile, web, and desktop.
- webview_flutter_wkwebviewweb_browser depends on itA Flutter plugin providing a WebView widget based on Apple's WKWebView control.
- webview_flutter_androidweb_browser depends on itAndroid implementation of the webview_flutter plugin providing a WebView widget.
- webview_flutterweb_browser depends on itFlutter plugin that embeds a native WebView widget.
- webview_flutter_webweb_browser depends on itWebView widget implementation for Flutter web.