Skip to content

A powerful official extension library of Tab/TabBar/TabView, which support to scroll ancestor or child Tabs when current is overscroll, and set scroll direction and cache extent.

License

Notifications You must be signed in to change notification settings

et4cow/extended_tabs

Repository files navigation

extended_tabs

pub package

extended tab bar view include color tabIndicator,linkWithAncestor(scroll ancestor tabbarView when current is over scroll),page cache extent

Chinese bolg

Usage

To use this plugin, add extended_tabs as a dependency in your pubspec.yaml file.

ColorTabIndicator

Show tab indicator with color fill

           TabBar(
             indicator: ColorTabIndicator(Colors.blue),
             labelColor: Colors.black,
             tabs: [
               Tab(text: "Tab0"),
               Tab(text: "Tab1"),
             ],
             controller: tabController,
           )

linkWithAncestor

  ///if linkedParentTabBarView is true and current tabbarview over scroll,
  ///it will check whether ancestor tabbarView can be scroll
  ///then scroll ancestor tabbarView
  final bool linkWithAncestor;
  
  
  ExtendedTabBarView(
   children: <Widget>[
   List("Tab000"),
   List("Tab001"),
   List("Tab002"),
   List("Tab003"),
   ],
   controller: tabController2,
   linkWithAncestor: true,
   )

cacheExtent

  /// cache page count
  /// default is 0.
  /// if cacheExtent is 1, it has two pages in cache
  /// null is infinity, it will cache all pages
  final int cacheExtent;
  
  ExtendedTabBarView(
   children: <Widget>[
   List("Tab000"),
   List("Tab001"),
   List("Tab002"),
   List("Tab003"),
   ],
   controller: tabController2,
   linkWithAncestor: true,
   cacheExtent: 1,
   )  

Please see the example app of this plugin for a full example.

About

A powerful official extension library of Tab/TabBar/TabView, which support to scroll ancestor or child Tabs when current is overscroll, and set scroll direction and cache extent.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 97.0%
  • Ruby 1.4%
  • HTML 1.1%
  • Other 0.5%