Skip to content

Plugin for flutter to open web page with Chrome Custom Tabs and SFSafariViewController

License

Notifications You must be signed in to change notification settings

KuoyHuot/flutter_web_browser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.0"

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.

About

Plugin for flutter to open web page with Chrome Custom Tabs and SFSafariViewController

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 43.6%
  • Objective-C 26.4%
  • Java 25.3%
  • Ruby 4.7%