ExtendedTabBar constructor

const ExtendedTabBar({
  1. Key? key,
  2. required List<Widget> tabs,
  3. TabController? controller,
  4. bool isScrollable = false,
  5. Color? indicatorColor,
  6. bool automaticIndicatorColorAdjustment = true,
  7. double indicatorWeight = 2.0,
  8. EdgeInsetsGeometry indicatorPadding = EdgeInsets.zero,
  9. Decoration? indicator,
  10. TabBarIndicatorSize? indicatorSize,
  11. Color? labelColor,
  12. TextStyle? labelStyle,
  13. EdgeInsetsGeometry? labelPadding,
  14. Color? unselectedLabelColor,
  15. TextStyle? unselectedLabelStyle,
  16. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  17. MaterialStateProperty<Color>? overlayColor,
  18. MouseCursor? mouseCursor,
  19. bool? enableFeedback,
  20. ValueChanged<int>? onTap,
  21. ScrollPhysics? physics,
  22. Axis scrollDirection = Axis.horizontal,
  23. bool foregroundIndicator = false,
  24. StrokeCap strokeCap = StrokeCap.square,
  25. MainAxisAlignment? mainAxisAlignment,
})

Creates a material design tab bar.

The tabs argument must not be null and its length must match the controller's TabController.length.

If a TabController is not provided, then there must be a DefaultTabController ancestor.

The indicatorWeight parameter defaults to 2, and must not be null.

The indicatorPadding parameter defaults to EdgeInsets.zero, and must not be null.

If indicator is not null or provided from TabBarTheme, then indicatorWeight, indicatorPadding, and indicatorColor are ignored.

Implementation

const ExtendedTabBar({
  Key? key,
  required this.tabs,
  this.controller,
  this.isScrollable = false,
  this.indicatorColor,
  this.automaticIndicatorColorAdjustment = true,
  this.indicatorWeight = 2.0,
  this.indicatorPadding = EdgeInsets.zero,
  this.indicator,
  this.indicatorSize,
  this.labelColor,
  this.labelStyle,
  this.labelPadding,
  this.unselectedLabelColor,
  this.unselectedLabelStyle,
  this.dragStartBehavior = DragStartBehavior.start,
  this.overlayColor,
  this.mouseCursor,
  this.enableFeedback,
  this.onTap,
  this.physics,
  this.scrollDirection = Axis.horizontal,
  this.foregroundIndicator = false,
  this.strokeCap = StrokeCap.square,
  this.mainAxisAlignment,
}) :
      //  assert(indicator != null ||
      //           (indicatorWeight != null && indicatorWeight > 0.0)),
      //       assert(indicator != null || (indicatorPadding != null)),
      super(key: key);