GFTabs constructor
const
GFTabs({
- Key? key,
- int? initialIndex = 0,
- required int length,
- required List<
Widget> tabs, - required GFTabBarView tabBarView,
- required TabController controller,
- bool isScrollable = false,
- double? height,
- Color? tabBarColor,
- Color? indicatorColor,
- double indicatorWeight = 2.0,
- EdgeInsetsGeometry indicatorPadding = EdgeInsets.zero,
- Decoration? indicator,
- TabBarIndicatorSize? indicatorSize,
- Color? labelColor,
- TextStyle? labelStyle,
- EdgeInsetsGeometry? labelPadding,
- Color? unselectedLabelColor,
- TextStyle? unselectedLabelStyle,
- double? tabBarHeight,
- ShapeBorder? shape,
Creates a default tab for the given child widget.
The length argument is typically greater than one. The length must match GFTabBar.tabs's and GFTabBarView.children's length.
The initialIndex argument must not be null.
Implementation
const GFTabs({
Key? key,
this.initialIndex = 0,
required this.length,
required this.tabs,
required this.tabBarView,
required this.controller,
this.isScrollable = false,
this.height,
this.tabBarColor,
this.indicatorColor,
this.indicatorWeight = 2.0,
this.indicatorPadding = EdgeInsets.zero,
this.indicator,
this.indicatorSize,
this.labelColor,
this.labelStyle,
this.labelPadding,
this.unselectedLabelColor,
this.unselectedLabelStyle,
this.tabBarHeight,
this.shape,
}) : assert(length >= 0),
assert(initialIndex != null &&
initialIndex >= 0 &&
(length == 0 || initialIndex < length)),
super(key: key);