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

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

example/lib/main.dart

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

void main() {
  // const app = CupertinoApp(
  //   title: 'Example',
  //   home: CupertinoPageScaffold(
  //     child: SafeArea(
  //       child: Browser(
  //         initialUriString: 'https://dart.dev/',
  //         policy: BrowserPolicy(
  //           allowedDomains: {
  //             // Allow navigation to flutter.dev and any subdomain.
  //             // Other websites will be opened in the user's browser.
  //             '**.flutter.dev',
  //
  //             // And some other websites...
  //             '**.dart.dev',
  //             '**.youtube.com',
  //           },
  //         ),
  //       ),
  //     ),
  //   ),
  // );
  const app = MaterialApp(
    title: 'Example',
    home: Scaffold(
      body: SafeArea(
        child: Browser(
          initialUriString: 'https://dart.dev/',
          policy: BrowserPolicy(
            allowedDomains: {
              // Allow navigation to flutter.dev and any subdomain.
              // Other websites will be opened in the user's browser.
              '**.flutter.dev',

              // And some other websites...
              '**.dart.dev',
              '**.youtube.com',
            },
          ),
        ),
      ),
    ),
  );

  runApp(app);
}
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, share_plus, webview_flutter, webview_flutter_android, webview_flutter_web, webview_flutter_wkwebview

More

Packages that depend on web_browser