AdaptiveBottomNavigation constructor
const
AdaptiveBottomNavigation({
- Key? key,
- double iconSize = 24.0,
- required List<
IconData> icons, - required List<
String> labels, - required List<
Widget> pages, - Color selectedColor = Colors.black,
- Color unselectedColor = Colors.black38,
- Color backgroundColor = Colors.white,
- Duration animationDuration = const Duration(milliseconds: 300),
- Curve animationIndicatorCurve = Curves.easeIn,
- Curve animationIconCurve = Curves.easeOut,
- BoxDecoration? indicatorDecoration,
- BoxDecoration? itemDecoration,
- double height = 60.0,
- double indicatorHeight = 4.0,
- double indicatorSpaceBottom = 2.0,
Creates an AdaptiveBottomNavigation.
The icons, labels, and pages parameters must not be null.
The iconSize, backgroundColor, selectedColor, unselectedColor, animationDuration,
animationIndicatorCurve, animationIconCurve, indicatorDecoration, itemDecoration,
bottomNavigationDecoration, height, indicatorHeight, and indicatorSpaceBottom
parameters control the appearance and behavior of the bottom navigation bar.
Throws an AssertionError if icons, labels, and pages lengths do not match.
Implementation
const AdaptiveBottomNavigation({
super.key,
this.iconSize = 24.0,
required this.icons,
required this.labels,
required this.pages,
this.selectedColor = Colors.black,
this.unselectedColor = Colors.black38,
this.backgroundColor = Colors.white,
this.animationDuration = const Duration(milliseconds: 300),
this.animationIndicatorCurve = Curves.easeIn,
this.animationIconCurve = Curves.easeOut,
this.indicatorDecoration,
this.itemDecoration,
this.bottomNavigationDecoration,
this.height = 60.0,
this.indicatorHeight = 4.0,
this.indicatorSpaceBottom = 2.0,
}) : assert(icons.length == labels.length,
'Icons and labels length must be the same'),
assert(icons.length == pages.length,
'Icons and pages length must be the same');