keyed_collection_widgets 0.4.4 keyed_collection_widgets: ^0.4.4 copied to clipboard
BottomNavigationBar, IndexedStack, and TabController that use item keys instead of indexes.
example #
All examples here are runnable. Download this repository to your computer and open it in your editor. In Android Studio, you can run examples like this:
1. nav_stack.dart #
This example shows KeyedBottomNavigationBar
and KeyedStack
widgets:
2. tabs.dart #
This example shows KeyedTabController
and widgets KeyedTabBar
and KeyedTabBarView
:
3. tabs_enum_map.dart #
This is a variation of tabs.dart
that uses enum_map
for compile-time type safety with tabs.
4. unanimated_keyed_tab_controller.dart #
This is a variation of tabs.dart
that uses `UnanimatedKeyedTabController.
5. nav_stack_tabs.dart #
This is the ultimate advanced example that shows:
- Changing the set of tabs without re-creating a controller.
- Programmatically activating a tab by its key.
- Programmatically activating a tab by its index.
- Changing the animation duration without re-creating a controller.
DefaultKeyedTabController
widgets.UnanimatedKeyedTabController
.- Replacing
UnanimatedKeyedTabController
thatKeyedTabController
is linked to.