web_browser 0.6.1 copy "web_browser: ^0.6.1" to clipboard
web_browser: ^0.6.1 copied to clipboard

A cross-platform Flutter widget for displaying websites and other web content. Has navigation Cupertino/Material buttons and takes care of complex platform differences.

Pub Package Github Actions CI

Overview #

Browser is a Flutter widget for browsing websites.

  • Works in Android, iOS, and browsers. Various cross-platform differences are handled correctly by the package so you don't need to deal with details of webview_flutter.
  • Has a customizable top bar that displays URI. To protect end-users against phishing attacks, we show the domain clearly and nothing else.
  • Has customizable bottom bar with buttons for "back", "forward", "refresh", and URL sharing.

Licensed under the Apache License 2.0.

Setting up #

1.Setup #

In pubspec.yaml:

dependencies:
  web_browser: ^0.6.0

2.Display web browser #

import 'package:flutter/material.dart';
import 'package:web_browser/web_browser.dart';

void main() {
  runApp(const MaterialApp(
    home: Scaffold(
      body: SafeArea(
        child: WebBrowser(
          initialUriString: 'https://flutter.cn/',
        ),
      ),
    ),
  ));
}

Manual #

Designs available in this package #

The package contains two designs:

By default, the package chooses a Cupertino or Material design based on whether the app is CupertinoApp or MaterialApp.

| | |

Localization #

Use BrowserLocalizations to localize the widgets.

69
likes
0
pub points
90%
popularity

Publisher

verified publisherdint.dev

A cross-platform Flutter widget for displaying websites and other web content. Has navigation Cupertino/Material buttons and takes care of complex platform differences.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

cupertino_icons, flutter, share_plus, webview_flutter, webview_flutter_android, webview_flutter_web, webview_flutter_wkwebview

More

Packages that depend on web_browser