SmartTabLayout constructor
SmartTabLayout({
- TabController? controller,
- ScrollController? scrollController,
- double? height,
- double? width,
- double? space,
- IndexedWidgetBuilder? spaceBuilder,
- double minHeight = 0,
- double minWidth = 0,
- EdgeInsets? margin,
- EdgeInsets padding = EdgeInsets.zero,
- Color? background,
- BorderRadius? borderRadius,
- BoxBorder? border,
- Axis direction = Axis.horizontal,
- int? childCount,
- List<
String> ? labels, - ScrollPhysics? physics,
- ValueChanged<
int> ? onTap, - IndexedWidgetBuilder? itemBuilder,
- bool isScrollable = false,
- double? itemHeight,
- double? itemWidth,
- EdgeInsets? itemPadding,
- Color? itemBackground = Colors.transparent,
- BorderRadius? itemBorderRadius,
- BoxBorder? itemBorder,
- TextStyle itemTextStyle = const TextStyle(color: Colors.black, fontSize: 14, fontWeight: FontWeight.w500),
- double? itemSelectedHeight,
- double? itemSelectedWidth,
- EdgeInsets? itemSelectedPadding,
- Color? itemSelectedBackground,
- BorderRadius? itemSelectedBorderRadius,
- BoxBorder? itemSelectedBorder,
- TextStyle? itemSelectedTextStyle,
- bool isInkWell = false,
- Color itemSplashColor = Colors.black,
- Color? itemShadowColor,
- double itemElevation = 0,
- bool itemTransition = false,
- Color? indicatorColor,
- double indicatorWeight = 2.0,
- double? indicatorWidth,
- EdgeInsetsGeometry indicatorPadding = EdgeInsets.zero,
- Decoration? indicator,
- bool automaticIndicatorColorAdjustment = true,
- TabBarIndicatorSize? indicatorSize,
- BorderRadius indicatorBorderRadius = BorderRadius.zero,
Implementation
SmartTabLayout({
this.controller,
ScrollController? scrollController,
this.height,
this.width,
this.space,
this.spaceBuilder,
this.minHeight = 0,
this.minWidth = 0,
this.margin,
this.padding = EdgeInsets.zero,
this.background,
this.borderRadius,
this.border,
this.direction = Axis.horizontal,
int? childCount,
this.labels,
this.physics,
this.onTap,
this.itemBuilder,
this.isScrollable = false,
this.itemHeight,
this.itemWidth,
this.itemPadding,
this.itemBackground = Colors.transparent,
this.itemBorderRadius,
this.itemBorder,
this.itemTextStyle = const TextStyle(
color: Colors.black,
fontSize: 14,
fontWeight: FontWeight.w500,
),
double? itemSelectedHeight,
double? itemSelectedWidth,
EdgeInsets? itemSelectedPadding,
Color? itemSelectedBackground,
BorderRadius? itemSelectedBorderRadius,
BoxBorder? itemSelectedBorder,
TextStyle? itemSelectedTextStyle,
this.isInkWell = false,
this.itemSplashColor = Colors.black,
this.itemShadowColor,
this.itemElevation = 0,
this.itemTransition = false,
this.indicatorColor,
this.indicatorWeight = 2.0,
this.indicatorWidth,
this.indicatorPadding = EdgeInsets.zero,
this.indicator,
this.automaticIndicatorColorAdjustment = true,
this.indicatorSize,
this.indicatorBorderRadius = BorderRadius.zero,
}) : assert(labels != null || childCount != null,
"childCount and labels have different lengths"),
assert(labels != null || itemBuilder != null,
"labels or itemBuilder Pass in at least one"),
this.childCount = childCount ?? labels?.length ?? 0,
this.itemSelectedHeight = itemSelectedHeight ?? itemHeight,
this.itemSelectedWidth = itemSelectedWidth ?? itemWidth,
this.itemSelectedPadding = itemSelectedPadding ?? itemPadding,
this.itemSelectedBackground = itemSelectedBackground ?? itemBackground,
this.itemSelectedBorderRadius =
itemSelectedBorderRadius ?? itemBorderRadius,
this.itemSelectedBorder = itemSelectedBorder ?? itemBorder,
this.itemSelectedTextStyle = itemSelectedTextStyle ?? itemTextStyle;