NavigationBar constructor
const
NavigationBar({
- required dynamic onTabChange(),
- Color? backgroundColor,
- Gradient? backgroundGradient,
- double backgroundOpacity = 0.5,
- double backgroundBlur = 2.5,
- EdgeInsetsGeometry padding = const EdgeInsets.all(6),
- EdgeInsetsGeometry outerPadding = const EdgeInsets.fromLTRB(8, 0, 8, 5),
- int selectedIndex = 0,
- double? fontSize,
- TextStyle textStyle = const TextStyle(fontWeight: FontWeight.bold),
- Color activeIconColor = Colors.white,
- Color inactiveIconColor = Colors.white,
- bool showActiveButtonText = true,
- int activeButtonFlexFactor = 160,
- int inactiveButtonsFlexFactor = 60,
- bool debugPaint = false,
- Key? key,
Put this in Scaffold's bottomNavigationBar
Implementation
const NavigationBar({
required this.navigationBarButtons,
required this.onTabChange,
this.backgroundColor,
this.backgroundGradient,
this.backgroundOpacity = 0.5,
this.backgroundBlur = 2.5,
this.padding = const EdgeInsets.all(6),
this.outerPadding = const EdgeInsets.fromLTRB(8, 0, 8, 5),
this.selectedIndex = 0,
this.fontSize,
this.textStyle = const TextStyle(fontWeight: FontWeight.bold),
this.activeIconColor = Colors.white,
this.inactiveIconColor = Colors.white,
this.showActiveButtonText = true,
this.activeButtonFlexFactor = 160,
this.inactiveButtonsFlexFactor = 60,
this.debugPaint = false,
Key? key,
}) : super(key: key);