SmartTabLayout constructor

SmartTabLayout({
  1. TabController? controller,
  2. ScrollController? scrollController,
  3. double? height,
  4. double? width,
  5. double? space,
  6. IndexedWidgetBuilder? spaceBuilder,
  7. double minHeight = 0,
  8. double minWidth = 0,
  9. EdgeInsets? margin,
  10. EdgeInsets padding = EdgeInsets.zero,
  11. Color? background,
  12. BorderRadius? borderRadius,
  13. BoxBorder? border,
  14. Axis direction = Axis.horizontal,
  15. int? childCount,
  16. List<String>? labels,
  17. ScrollPhysics? physics,
  18. ValueChanged<int>? onTap,
  19. IndexedWidgetBuilder? itemBuilder,
  20. bool isScrollable = false,
  21. double? itemHeight,
  22. double? itemWidth,
  23. EdgeInsets? itemPadding,
  24. Color? itemBackground = Colors.transparent,
  25. BorderRadius? itemBorderRadius,
  26. BoxBorder? itemBorder,
  27. TextStyle itemTextStyle = const TextStyle(color: Colors.black, fontSize: 14, fontWeight: FontWeight.w500),
  28. double? itemSelectedHeight,
  29. double? itemSelectedWidth,
  30. EdgeInsets? itemSelectedPadding,
  31. Color? itemSelectedBackground,
  32. BorderRadius? itemSelectedBorderRadius,
  33. BoxBorder? itemSelectedBorder,
  34. TextStyle? itemSelectedTextStyle,
  35. bool isInkWell = false,
  36. Color itemSplashColor = Colors.black,
  37. Color? itemShadowColor,
  38. double itemElevation = 0,
  39. bool itemTransition = false,
  40. Color? indicatorColor,
  41. double indicatorWeight = 2.0,
  42. double? indicatorWidth,
  43. EdgeInsetsGeometry indicatorPadding = EdgeInsets.zero,
  44. Decoration? indicator,
  45. bool automaticIndicatorColorAdjustment = true,
  46. TabBarIndicatorSize? indicatorSize,
  47. 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;