Skip to content

Latest commit

 

History

History
50 lines (40 loc) · 1.42 KB

README.md

File metadata and controls

50 lines (40 loc) · 1.42 KB

flutter_web_browser

Pub

A flutter plugin to open a web page with Chrome Custom Tabs & SFSafariViewController.

This plugin is under development, APIs might change.

Getting Started

Installation

Install the library from pub:

dependencies:
  flutter_web_browser: "^0.17.1"

Import the library

import 'package:flutter_web_browser/flutter_web_browser.dart';
Open the web page
FlutterWebBrowser.openWebPage(
  url: "https://flutter.io/",
  customTabsOptions: const CustomTabsOptions(
    colorScheme: CustomTabsColorScheme.dark,
    toolbarColor: Colors.deepPurple,
    secondaryToolbarColor: Colors.green,
    navigationBarColor: Colors.amber,
    shareState: CustomTabsShareState.on,
    instantAppsEnabled: true,
    showTitle: true,
    urlBarHidingEnabled: true,
  ),
  safariVCOptions: const SafariViewControllerOptions(
    barCollapsingEnabled: true,
    preferredBarTintColor: Colors.green,
    preferredControlTintColor: Colors.amber,
    dismissButtonStyle: SafariViewControllerDismissButtonStyle.close,
    modalPresentationCapturesStatusBarAppearance: true,
  ),
);

License

This project is licensed under the terms of the MIT license.