FLUTTER ECOSYSTEM

victorbonnet/flutter_web_browser

用于 Flutter 的插件,可通过 Chrome 自定义标签页和 SFSafariViewController 打开网页

flutter_web_browser 项目封面
Stars
66
Forks
52
最近推送(UTC)
2025年3月15日
项目状态
未归档
Victor Bonnet GitHub avatar
GITHUB User

Victor Bonnet ↗

Staff Engineer · AI Research Lead · Builder I'm a builder first. Started shipping mobile apps in 2011, got acquired in 2012, never stopped building since.

NexthinkLausanne
语言DartObjective-CJavaRuby

此仓库发布的插件

使用的依赖

依赖清单 1 项
  • flutter{"sdk":"flutter"}

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

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