extended tab bar view include color tabIndicator,linkWithAncestor(scroll ancestor tabbarView when current is over scroll),page cache extent
To use this plugin, add
extended_tabs as a dependency in your pubspec.yaml file.
Show tab indicator with color fill
TabBar( indicator: ColorTabIndicator(Colors.blue), labelColor: Colors.black, tabs: [ Tab(text: "Tab0"), Tab(text: "Tab1"), ], controller: tabController, )
///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, )
/// 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.
- fix null exception
- improve codes base on v1.7.8
- add cacheExtent for extended page
- fix https://github.com/flutter/flutter/issues/24660 https://github.com/flutter/flutter/issues/27010 use pr code from https://github.com/flutter/flutter/pull/24821/files
- format code
- Initial Open Source release.
A new Flutter application.
Getting Started #
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: extended_tabs: ^0.2.2
2. Install it
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
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]
We analyzed this package on Jan 16, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.0
- pana: 0.13.4
- Flutter: 1.12.13+hotfix.5
lib/src/tabs.dart. (-1 points)
lib/src/tabs.dart reported 2 hints:
line 267 col 19: 'ancestorStateOfType' is deprecated and shouldn't be used. Use findAncestorStateOfType instead. This feature was deprecated after v1.12.1..
line 267 col 39: 'TypeMatcher' is deprecated and shouldn't be used. TypeMatcher has been deprecated because it is no longer used in framework(only in deprecated methods). This feature was deprecated after v1.12.1..