AnimatedTextBar constructor

AnimatedTextBar({
  1. Key? key,
  2. required List<BarItem> items,
  3. ValueChanged<int>? onTap,
  4. int currentIndex = 0,
  5. double? elevation,
  6. Color? backgroundColor,
  7. Color? shadowColor,
  8. Duration animatedTextDuration = const Duration(milliseconds: 250),
  9. Curve animatedTextCurve = Curves.easeInOut,
  10. TextStyle? selectedLabelStyle,
  11. TextStyle? unselectedLabelStyle,
  12. EdgeInsetsGeometry? margin,
  13. EdgeInsetsGeometry? padding,
  14. BorderRadiusGeometry? borderRadius,
  15. TextPosition textPosition = TextPosition.RIGHT,
  16. Color? selectedItemColor,
  17. Color? unselectedItemColor,
  18. BorderRadiusGeometry? selectedItemBorderRadius,
  19. double selectedFontSize = 14.0,
  20. double unselectedFontSize = 12.0,
})

Creates a animated text bar which is typically used as a Scaffold's Scaffold.bottomNavigationBar argument.

The length of items must be at least two and each item's iconData or image and label must not be null.

elevation argument must be non-negative.

Implementation

AnimatedTextBar({
  Key? key,
  required this.items,
  this.onTap,
  this.currentIndex = 0,
  this.elevation,
  this.backgroundColor,
  this.shadowColor,
  this.animatedTextDuration = const Duration(milliseconds: 250),
  this.animatedTextCurve = Curves.easeInOut,
  this.selectedLabelStyle,
  this.unselectedLabelStyle,
  this.margin,
  this.padding,
  this.borderRadius,
  this.textPosition = TextPosition.RIGHT,
  this.selectedItemColor,
  this.unselectedItemColor,
  this.selectedItemBorderRadius,
  this.selectedFontSize = 14.0,
  this.unselectedFontSize = 12.0,
})  : assert(elevation == null || elevation >= 0.0),
      super(key: key);