Skip to content
pubscout

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.

$ flutter pub add web_browser
Source repository

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.

Works with

Packages commonly used together with web_browser: ones it builds on, ones built on it, and its own family.