infinite_scrollable_tabbar 0.0.1
infinite_scrollable_tabbar: ^0.0.1 copied to clipboard
A fully customizable Flutter tab bar with infinite scrolling capability. Create horizontally scrollable tab bars where tabs repeat seamlessly in both directions.
0.0.1 #
Initial release of the Infinite Scrollable TabBar package.
Features #
- β¨ Infinite Scrolling: Tabs repeat seamlessly in both directions for unlimited scrolling
- π― Smart Controller:
InfiniteScrollableTabController
with intelligent index mapping - π¨ Fully Customizable:
- Custom tab styles (selected and unselected)
- Custom tab builder for complete control over tab appearance
- Custom indicator builder
- Configurable indicator position (top or bottom)
- Adjustable tab width, height, and padding
- Custom background colors
- π Smooth Animations: Built-in support for animated transitions with dual scrolling modes
- Tap Behavior: Scrolls directly to the visible tab instance you tap for natural, intuitive interaction
- Programmatic Behavior:
animateToIndex()
uses intelligent shortest-path detection for efficient navigation animateToVirtualIndex()
for scrolling to specific tab instancesjumpToIndex()
for instant navigation with shortest-path logic- Configurable animation duration and curves
- Automatically determines whether to scroll forward or backward based on context
- π± Responsive: Works seamlessly with dynamic tab lists
- π Easy Integration: Simple API with sensible defaults
Components #
InfiniteScrollableTabBar
: Main widget for displaying the infinite scrollable tab barInfiniteScrollableTabController
: Controller for managing state and programmatic scrollingTabItem
: Data model representing a single tab with support for labels, icons, and badgesTabIndicator
: Customizable indicator widget for selected tabsIndicatorPosition
: Enum for indicator positioning (top/bottom)
Example App #
Includes comprehensive example app demonstrating:
- Basic usage with text tabs
- Custom styled tabs
- Tabs with icons
- Programmatic scrolling (next, previous, random)
- Dynamic tab management (add/remove tabs)
Scroll Behavior #
The package implements two distinct scrolling behaviors for optimal UX:
Tab Tap Behavior:
- When you tap a visible tab, it scrolls directly to that specific instance
- Natural and intuitive - you get exactly what you tap
- Example: Tapping Tab 3 when at Tab 5 scrolls to the visible Tab 3
Programmatic Navigation:
- Uses intelligent shortest-path calculation
- Automatically chooses to scroll forward or backward based on efficiency
- Perfect for button-based navigation (Next/Previous/Random)
- Example: From Tab 5, calling
animateToIndex(1)
wraps forward (5β0β1) instead of going backward
Documentation #
- Comprehensive README with usage examples
- Complete API reference with tap vs programmatic scrolling explanation
- Detailed inline documentation (dartdoc)
- How it works explanation
- Example app with 5 interactive demos