Moony Navigation Bar
Donate
GIF
- #1
- #2
- #3
- #4 Custom NavigationBarItem
- #5 with margin and border radius
Setup
With flutter
Run this command:
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
Import it
Now at your code, you can use:
Style
All navigation bar style contained inside the MoonyNavStyle class
Attributes | Type | Default | Description |
activeColor | Color | Color.black | Active Color |
color | Color | Color.black45 | Inactive navigation item color |
indicatorColor | Color | activeColor | Indicator color |
backgroundColor | Color | Colors.white | Background color |
indicatorPosition | IndicatorPosition | IndicatorPosition.TOP | Indicator position |
indicatorType | IndicatorType | IndicatorType.POINT | Indicator type |
marginLeft | double | 0 | Margin left |
marginRight | double | 0 | Margin right |
marginBottom | double | 0 | Margin bottom |
elevation | double | 5 | Navigation elevation |
borderRadius | BorderRadius? | null | Navigation border radius. example : |
NavigationBarItem attributes
Attributes | Type | Default | Description |
icon | IconData | Default Icon | |
onTap | NavigationButtonTapCallback | Tap listener | |
activeIcon | IconData | null | Active icon |
indicatorColor | Color | style.indicatorColor | Indicator color |
color | Color | style.activeColor | Active icon color |
Example
Note:
_screen1, _screen2, _screen3, _screen4 is my example, you can replace them with your screen
Last updated