BaseTabBar constructor

BaseTabBar({
  1. Key? key,
  2. TabController? controller,
  3. bool isScrollable = false,
  4. EdgeInsetsGeometry? padding,
  5. bool automaticIndicatorColorAdjustment = true,
  6. double indicatorWeight = 2.0,
  7. EdgeInsetsGeometry indicatorPadding = EdgeInsets.zero,
  8. Decoration? indicator,
  9. TabBarIndicatorSize? indicatorSize = TabBarIndicatorSize.label,
  10. Color? dividerColor = UCS.transparent,
  11. EdgeInsetsGeometry? labelPadding,
  12. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  13. MaterialStateProperty<Color?>? overlayColor,
  14. MouseCursor? mouseCursor,
  15. bool? enableFeedback,
  16. ValueChanged<int>? onTap,
  17. ScrollPhysics? physics,
  18. InteractiveInkFeatureFactory? splashFactory,
  19. BorderRadius? splashBorderRadius,
  20. double? dividerHeight,
  21. Color? unselectedLabelColor = UCS.black70,
  22. TabAlignment? tabAlignment,
  23. TextStyle? labelStyle,
  24. TextStyle? unselectedLabelStyle,
  25. Color? indicatorColor,
  26. Color? labelColor,
  27. String? fontFamily,
  28. FontWeight? fontWeight,
  29. double fontSize = 16,
  30. double height = 38,
  31. List<Widget>? tabs,
  32. List<String>? list,
})

Implementation

BaseTabBar({
  super.key,
  super.controller,
  super.isScrollable = false,
  super.padding,
  super.automaticIndicatorColorAdjustment = true,
  super.indicatorWeight = 2.0,
  super.indicatorPadding = EdgeInsets.zero,
  super.indicator,
  super.indicatorSize = TabBarIndicatorSize.label,
  super.dividerColor = UCS.transparent,
  super.labelPadding,
  super.dragStartBehavior = DragStartBehavior.start,
  super.overlayColor,
  super.mouseCursor,
  super.enableFeedback,
  super.onTap,
  super.physics,
  super.splashFactory,
  super.splashBorderRadius,
  super.dividerHeight,
  super.unselectedLabelColor = UCS.black70,
  TabAlignment? tabAlignment,
  TextStyle? labelStyle,
  TextStyle? unselectedLabelStyle,
  Color? indicatorColor,
  Color? labelColor,
  String? fontFamily,
  FontWeight? fontWeight,
  double fontSize = 16,
  double height = 38,
  List<Widget>? tabs,
  List<String>? list,
})  : assert(tabs != null || list != null),
      super(
          tabAlignment:
              tabAlignment ?? (isScrollable ? TabAlignment.start : null),
          tabs: tabs ??
              list?.builder((value) => Tab(text: value, height: height)) ??
              [],
          labelColor: labelColor ?? Universally().mainColor,
          indicatorColor:
              indicatorColor ?? labelColor ?? Universally().mainColor,
          labelStyle: labelStyle ??
              TStyle(
                  fontFamily: fontFamily,
                  fontSize: fontSize,
                  fontWeight: fontWeight),
          unselectedLabelStyle: unselectedLabelStyle ??
              TStyle(
                  fontFamily: fontFamily,
                  fontSize: fontSize,
                  fontWeight: fontWeight));