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

outdated

A cross-platform Flutter widget for displaying websites and other web content. Has optional navigation buttons.

Pub Package Github Actions CI

Overview #

Gives you a cross-platform Flutter widget for displaying websites and other web content.

Licensed under the Apache License 2.0.

Cross-platform #

WebBrowser widget is cross-platform:

  • In Android and iOS, this package uses webview_flutter, which is maintained by Google.
    • However, webview_flutter does not support browsers.
  • In browsers, the package uses package:web_node to display web content inside <iframe>.
    • Only works for websites that allow iframes.
    • Only some navigation features are supported (because of iframe limitations).

Optional navigation widgets #

  • Address bar
  • Share button
  • Back button
  • Forward button

Setting up #

1.Setup #

In pubspec.yaml:

dependencies:
  web_browser: ^0.4.0

2.Display web browser #

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

void main() {
  runApp(MaterialApp(
    home: Scaffold(
      body: SafeArea(
        child: WebBrowser(
          initialUrl: 'https://flutter.dev/',
          javascriptEnabled: true,
        ),
      ),
    ),
  ));
}
70
likes
0
pub points
89%
popularity

Publisher

verified publisherdint.dev

A cross-platform Flutter widget for displaying websites and other web content. Has optional navigation buttons.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cupertino_icons, flutter, meta, share, universal_html, web_node, webview_flutter

More

Packages that depend on web_browser