builder static method
Widget
builder({
- Key? key,
- bool isLoading = false,
- required TabController? controller,
- required void onTap(
- int index
- required int itemCount,
- required Widget builder(),
- bool isScrollable = false,
- EdgeInsetsGeometry? padding,
- Color? indicatorColor,
- bool automaticIndicatorColorAdjustment = true,
- double indicatorWeight = 2.0,
- EdgeInsetsGeometry indicatorPadding = EdgeInsets.zero,
- Decoration? indicator,
- TabBarIndicatorSize? indicatorSize,
- Color? dividerColor,
- double? dividerHeight,
- Color? labelColor,
- TextStyle? labelStyle,
- EdgeInsetsGeometry? labelPadding,
- Color? unselectedLabelColor,
- TextStyle? unselectedLabelStyle,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- WidgetStateProperty<
Color?> ? overlayColor, - MouseCursor? mouseCursor,
- bool? enableFeedback,
- ScrollPhysics? physics,
- InteractiveInkFeatureFactory? splashFactory,
- BorderRadius? splashBorderRadius,
- TabAlignment? tabAlignment,
UncompleteDocumentation
Implementation
static Widget builder({
Key? key,
bool isLoading = false,
required TabController? controller,
required void Function(int index)? onTap,
required int itemCount,
required Widget Function(bool isActiveOrSelected, int index) builder,
bool isScrollable = false,
EdgeInsetsGeometry? padding,
Color? indicatorColor,
bool automaticIndicatorColorAdjustment = true,
double indicatorWeight = 2.0,
EdgeInsetsGeometry indicatorPadding = EdgeInsets.zero,
Decoration? indicator,
TabBarIndicatorSize? indicatorSize,
Color? dividerColor,
double? dividerHeight,
Color? labelColor,
TextStyle? labelStyle,
EdgeInsetsGeometry? labelPadding,
Color? unselectedLabelColor,
TextStyle? unselectedLabelStyle,
DragStartBehavior dragStartBehavior = DragStartBehavior.start,
WidgetStateProperty<Color?>? overlayColor,
MouseCursor? mouseCursor,
bool? enableFeedback,
ScrollPhysics? physics,
InteractiveInkFeatureFactory? splashFactory,
BorderRadius? splashBorderRadius,
TabAlignment? tabAlignment,
}) {
final int index = controller!.index;
return TabbarGeneralFrameworkWidget(
key: key,
isLoading: isLoading,
controller: controller,
onTap: onTap,
tabs: [
for (var i = 0; i < itemCount; i++) ...[
builder(index == i, i),
],
],
isScrollable: isScrollable,
padding: padding,
indicatorColor: indicatorColor,
automaticIndicatorColorAdjustment: automaticIndicatorColorAdjustment,
indicatorWeight: indicatorWeight,
indicatorPadding: indicatorPadding,
indicator: indicator,
indicatorSize: indicatorSize,
dividerColor: dividerColor,
dividerHeight: dividerHeight,
labelColor: labelColor,
labelStyle: labelStyle,
labelPadding: labelPadding,
unselectedLabelColor: unselectedLabelColor,
unselectedLabelStyle: unselectedLabelStyle,
dragStartBehavior: dragStartBehavior,
overlayColor: overlayColor,
mouseCursor: mouseCursor,
enableFeedback: enableFeedback,
physics: physics,
splashFactory: splashFactory,
splashBorderRadius: splashBorderRadius,
tabAlignment: tabAlignment,
);
}