flutter_custom_tabs 0.6.0

  • README.md
  • Example
  • Installing
  • Versions
  • 96

flutter_custom_tabs #

pub package Build Status

A Flutter plugin to use Chrome Custom Tabs.


Custom Tabs is supported only Chrome for Android. For this reason, the interface is same, but behavior is following:

  • Android
    If Chrome is installed, open web URL in custom tab that you have customized some of look & feel. If it is not installed, open in other browser.
  • iOS
    Open SFSafariViewController using url_launcher, and all options at launch are ignored.

Getting Started #

Add flutter_custom_tabs to the dependencies of your pubspec.yaml.

  flutter_custom_tabs: "^0.6.0"

Usage #

Open the web URL like url_launcher.

Example #

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

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
    return new MaterialApp(
      theme: new ThemeData(
        primarySwatch: Colors.blue,
      home: new Scaffold(
        body: new Center(
          child: new FlatButton(
            child: new Text('Show Flutter homepage'),
            onPressed: () => _launchURL(context),

  void _launchURL(BuildContext context) async {
    try {
      await launch(
        option: new CustomTabsOption(
          toolbarColor: Theme.of(context).primaryColor,
          enableDefaultShare: true,
          enableUrlBarHiding: true,
          showPageTitle: true,
          animation: new CustomTabsAnimation.slideIn()
          // or user defined animation.
          animation: new CustomTabsAnimation(
            startEnter: 'slide_up',
            startExit: 'android:anim/fade_out',
            endEnter: 'android:anim/fade_in',
            endExit: 'slide_down',
          extraCustomTabs: <String>[
            // ref. https://play.google.com/store/apps/details?id=org.mozilla.firefox
            // ref. https://play.google.com/store/apps/details?id=com.microsoft.emmx
    } catch (e) {
      // An exception is thrown if browser app is not installed on Android device.

License #

Copyright (C) 2015 The Android Open Source Project
Copyright (C) 2018 Shinya Kumagai

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

0.6.0 #

  • Added HTTP headers option(#13)

0.5.0 #

This package only support CustomTabs for androidx from v0.5.0.
If you migrate existing project to androidx see the official docs.

  • AndroidX support(#11)

0.4.0 #

  • Fix: Only works with Chrome(#2).

0.3.0 #

  • Migrate to dart 2.0 release(#1).

0.2.0 #

  • Support custom transition.
  • Support enabling of Instant apps.

0.1.0 #

Initial release of plugin supports following customization options:

  • Custom tab toolbar color.
  • Hides the toolbar when the user scrolls down the page.
  • Adds default sharing menu.
  • Show web page title in tool bar.

ref. CustomTabsIntent.Builder


flutter_custom_tabs_example #

Demonstrates how to use the flutter_custom_tabs plugin.

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_custom_tabs: ^0.6.0

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_custom_tabs/flutter_custom_tabs.dart';
Version Uploaded Documentation Archive
0.6.0 Mar 10, 2019 Go to the documentation of flutter_custom_tabs 0.6.0 Download flutter_custom_tabs 0.6.0 archive
0.5.0 Feb 27, 2019 Go to the documentation of flutter_custom_tabs 0.5.0 Download flutter_custom_tabs 0.5.0 archive
0.4.0 Sep 7, 2018 Go to the documentation of flutter_custom_tabs 0.4.0 Download flutter_custom_tabs 0.4.0 archive
0.3.0 Aug 22, 2018 Go to the documentation of flutter_custom_tabs 0.3.0 Download flutter_custom_tabs 0.3.0 archive
0.2.0 May 13, 2018 Go to the documentation of flutter_custom_tabs 0.2.0 Download flutter_custom_tabs 0.2.0 archive
0.1.0 Apr 17, 2018 Go to the documentation of flutter_custom_tabs 0.1.0 Download flutter_custom_tabs 0.1.0 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Apr 25, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14
  • Flutter: 1.4.7


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/src/custom_tabs_option.dart.

Run flutter format to format lib/src/custom_tabs_option.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28 <3.0.0
flutter 0.0.0
url_launcher ^5.0.1 5.0.2
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies