Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tunitowen/fancy_bottom_navigation
Flutter plugin - FancyBottomNavigation
https://github.com/tunitowen/fancy_bottom_navigation
bottomnavigationbar fancy flutter tabs
Last synced: 2 months ago
JSON representation
Flutter plugin - FancyBottomNavigation
- Host: GitHub
- URL: https://github.com/tunitowen/fancy_bottom_navigation
- Owner: tunitowen
- License: apache-2.0
- Created: 2019-01-05T06:44:29.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-01T16:20:13.000Z (about 1 year ago)
- Last Synced: 2024-07-31T15:01:37.910Z (5 months ago)
- Topics: bottomnavigationbar, fancy, flutter, tabs
- Language: Dart
- Size: 321 KB
- Stars: 752
- Watchers: 18
- Forks: 186
- Open Issues: 43
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-flutter-cn - Fancy Bottom Navigation - 动画底部导航,由[Tony Owen](https://github.com/tunitowen)提供。 (组件 / UI)
- awesome-flutter-cn - Fancy Bottom Navigation - 带动画的底部导航,[Tony Owen](https://github.com/tunitowen). (组件 / UI)
- awesome-flutter - Fancy Bottom Navigation - Flutter plugin - FancyBottomNavigation ` 📝 3 months ago` (UI [🔝](#readme))
- awesome-flutter - Fancy Bottom Navigation - Animated bottom navigation by [Tony Owen](https://github.com/tunitowen). (Components / UI)
README
# FancyBottomNavigation
![Fancy Gif](https://github.com/tunitowen/fancy_bottom_navigation/blob/master/fancy_gif.gif "Fancy Gif")
## Getting Started
Add the plugin (pub coming soon):
```yaml
dependencies:
...
fancy_bottom_navigation: ^0.3.2
```## Limitations
For now this is limited to more than 1 tab, and less than 5. So 2-4 tabs.## Basic Usage
Adding the widget
```dart
bottomNavigationBar: FancyBottomNavigation(
tabs: [
TabData(iconData: Icons.home, title: "Home"),
TabData(iconData: Icons.search, title: "Search"),
TabData(iconData: Icons.shopping_cart, title: "Basket")
],
onTabChangedListener: (position) {
setState(() {
currentPage = position;
});
},
)
```## TabData
**iconData** -> Icon to be used for the tab
**title** -> String to be used for the tab
**onClick** -> Optional function to be used when the circle itself is clicked, on an active tab## Attributes
### required
**tabs** -> List of `TabData` objects
**onTabChangedListener** -> Function to handle a tap on a tab, receives `int position`### optional
**initialSelection** -> Defaults to 0
**circleColor** -> Defaults to null, derives from `Theme`
**activeIconColor** -> Defaults to null, derives from `Theme`
**inactiveIconColor** -> Defaults to null, derives from `Theme`
**textColor** -> Defaults to null, derives from `Theme`
**barBackgroundColor** -> Defaults to null, derives from `Theme`
**key** -> Defaults to null## Theming
The bar will attempt to use your current theme out of the box, however you may want to theme it. Here are the attributes:
![Fancy Theming](https://github.com/tunitowen/fancy_bottom_navigation/blob/master/fancy_theming.png "Fancy Theming")
## Programmatic Selection
To select a tab programmatically you will need to assign a GlobalKey to the widget. When you want to change tabs you will need to access the State using this key, and then call `setPage(position)`.
See example project, main.dart, line 75 for an example.## Showcase
Using this package in a live app, let me know and I'll add you app here.## Inspiration
This package was inspired by a design on dribbble by Manoj Rajput:
https://dribbble.com/shots/5419022-Tab## Contributing
Contributions are welcome, please submit a PR :)