TxTabBar constructor

const TxTabBar({
  1. required List<Widget> tabs,
  2. Key? key,
  3. TabController? controller,
  4. EdgeInsetsGeometry? padding,
  5. Color? indicatorColor,
  6. bool automaticIndicatorColorAdjustment = true,
  7. TabIndicatorDecoration? indicatorDecoration,
  8. double indicatorWeight = 2.0,
  9. EdgeInsetsGeometry indicatorPadding = EdgeInsets.zero,
  10. UnderlineTabIndicator? indicator,
  11. TabBarIndicatorSize? indicatorSize,
  12. Color? dividerColor,
  13. double? dividerHeight,
  14. Color? labelColor,
  15. TextStyle? labelStyle,
  16. EdgeInsetsGeometry? labelPadding,
  17. Color? unselectedLabelColor,
  18. TextStyle? unselectedLabelStyle,
  19. ValueChanged<int>? onTap,
})

创建一个不规则形状的TabBar

Implementation

const TxTabBar({
  required super.tabs,
  super.key,
  super.controller,
  super.padding,
  super.indicatorColor,
  super.automaticIndicatorColorAdjustment = true,
  this.indicatorDecoration,
  super.indicatorWeight = 2.0,
  super.indicatorPadding = EdgeInsets.zero,
  super.indicator,
  super.indicatorSize,
  this.dividerColor,
  this.dividerHeight,
  super.labelColor,
  super.labelStyle,
  super.labelPadding,
  super.unselectedLabelColor,
  super.unselectedLabelStyle,
  super.onTap,
}) : assert(indicator != null || (indicatorWeight > 0.0));