Customizable Flutter widget which syncronize ScrollView with PageView as tabs.
Create a custom page view as tabs which synchronize with inner ScrollView. The page view follows the index of scroll view and vice-versa.
Usage
To use this widget we must first define how our tabs will look like.
ScrollableListTabScroller
Parameter |
Definition |
int itemCount |
Quantity item that will be built. |
IndexedWidgetBuilder itemBuilder |
Builder of list item. |
IndexedActiveStatusWidgetBuilder tabBuilder |
Builder of tab with active status for customization. |
HeaderBuilder? headerBuilder |
Optional header builder for costomization. |
ItemScrollController? itemScrollController |
Optional controller for item list. |
PageController? tabPageController |
Optional controller for tabs. |
ItemPositionsListener? itemPositionsListener |
Optional listener of item list positions. |
void Function(int)? tabChanged |
Optional listener of tab changes. |
double minEdgeBeforeChangeTab |
Optional height percentage to change the index before the list item reaches the edge(default = 0). |
Example
Limitations & Considerations
Tab scroller has a limitation, it is built with PageView, allowing less customization possibilities for tabs.
This widget is inspired in scrollable_list_tabview.
License
This project is licensed under the MIT license, additional knowledge about the license can be found here.
GitHub
View Github