SnakeNavigationBar.color constructor

SnakeNavigationBar.color({
  1. Key? key,
  2. Color? snakeViewColor,
  3. Color? backgroundColor,
  4. Color? selectedItemColor,
  5. Color? unselectedItemColor,
  6. bool showSelectedLabels = false,
  7. bool showUnselectedLabels = false,
  8. List<BottomNavigationBarItem>? items,
  9. int currentIndex = 0,
  10. ShapeBorder? shape,
  11. EdgeInsets padding = EdgeInsets.zero,
  12. double elevation = 0.0,
  13. ValueChanged<int>? onTap,
  14. SnakeBarBehaviour behaviour = SnakeBarBehaviour.pinned,
  15. SnakeShape snakeShape = SnakeShape.circle,
  16. Color shadowColor = Colors.black,
  17. TextStyle? selectedLabelStyle,
  18. TextStyle? unselectedLabelStyle,
  19. double? height,
})

Implementation

factory SnakeNavigationBar.color({
  Key? key,
  Color? snakeViewColor,
  Color? backgroundColor,
  Color? selectedItemColor,
  Color? unselectedItemColor,
  bool showSelectedLabels = false,
  bool showUnselectedLabels = false,
  List<BottomNavigationBarItem>? items,
  int currentIndex = 0,
  ShapeBorder? shape,
  EdgeInsets padding = EdgeInsets.zero,
  double elevation = 0.0,
  ValueChanged<int>? onTap,
  SnakeBarBehaviour behaviour = SnakeBarBehaviour.pinned,
  SnakeShape snakeShape = SnakeShape.circle,
  Color shadowColor = Colors.black,
  TextStyle? selectedLabelStyle,
  TextStyle? unselectedLabelStyle,
  double? height,
}) =>
    SnakeNavigationBar._(
      SelectionStyle.color,
      key: key,
      snakeViewGradient: snakeViewColor?.toGradient,
      backgroundGradient: backgroundColor?.toGradient,
      selectedItemGradient: selectedItemColor?.toGradient,
      unselectedItemGradient: unselectedItemColor?.toGradient,
      showSelectedLabels: showSelectedLabels,
      showUnselectedLabels: showUnselectedLabels,
      items: items,
      currentIndex: currentIndex,
      shape: shape,
      padding: padding,
      elevation: elevation,
      onTap: onTap,
      behaviour: behaviour,
      snakeShape: snakeShape,
      shadowColor: shadowColor,
      selectedLabelStyle: selectedLabelStyle,
      unselectedLabelStyle: unselectedLabelStyle,
      height: height ?? kBottomNavigationBarHeight,
    );