GNav constructor
const
GNav(
- {Key? key,
- required List<
GButton> tabs, - int selectedIndex = 0,
- ValueChanged<
int> ? onTabChange, - double gap = 0,
- EdgeInsetsGeometry padding = const EdgeInsets.all(25),
- Color? activeColor,
- Color? color,
- Color rippleColor = Colors.transparent,
- Color hoverColor = Colors.transparent,
- Color backgroundColor = Colors.transparent,
- Color tabBackgroundColor = Colors.transparent,
- double tabBorderRadius = 100.0,
- double? iconSize,
- TextStyle? textStyle,
- Curve curve = Curves.easeInCubic,
- EdgeInsetsGeometry tabMargin = EdgeInsets.zero,
- bool debug = false,
- Duration duration = const Duration(milliseconds: 500),
- Border? tabBorder,
- Border? tabActiveBorder,
- List<
BoxShadow> ? tabShadow, - bool haptic = true,
- Gradient? tabBackgroundGradient,
- MainAxisAlignment mainAxisAlignment = MainAxisAlignment.spaceBetween,
- GnavStyle? style = GnavStyle.google,
- double? textSize}
Implementation
const GNav({
Key? key,
required this.tabs,
this.selectedIndex = 0,
this.onTabChange,
this.gap = 0,
this.padding = const EdgeInsets.all(25),
this.activeColor,
this.color,
this.rippleColor = Colors.transparent,
this.hoverColor = Colors.transparent,
this.backgroundColor = Colors.transparent,
this.tabBackgroundColor = Colors.transparent,
this.tabBorderRadius = 100.0,
this.iconSize,
this.textStyle,
this.curve = Curves.easeInCubic,
this.tabMargin = EdgeInsets.zero,
this.debug = false,
this.duration = const Duration(milliseconds: 500),
this.tabBorder,
this.tabActiveBorder,
this.tabShadow,
this.haptic = true,
this.tabBackgroundGradient,
this.mainAxisAlignment = MainAxisAlignment.spaceBetween,
this.style = GnavStyle.google,
this.textSize,
}) : super(key: key);