NavigationBar constructor

const NavigationBar({
  1. required List<NavigationBarButton> navigationBarButtons,
  2. required dynamic onTabChange(
    1. int
    ),
  3. Color? backgroundColor,
  4. Gradient? backgroundGradient,
  5. double backgroundOpacity = 0.5,
  6. double backgroundBlur = 2.5,
  7. EdgeInsetsGeometry padding = const EdgeInsets.all(6),
  8. EdgeInsetsGeometry outerPadding = const EdgeInsets.fromLTRB(8, 0, 8, 5),
  9. int selectedIndex = 0,
  10. double? fontSize,
  11. TextStyle textStyle = const TextStyle(fontWeight: FontWeight.bold),
  12. Color activeIconColor = Colors.white,
  13. Color inactiveIconColor = Colors.white,
  14. bool showActiveButtonText = true,
  15. int activeButtonFlexFactor = 160,
  16. int inactiveButtonsFlexFactor = 60,
  17. bool debugPaint = false,
  18. 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);