PickerTabBar.secondary constructor
const
PickerTabBar.secondary({
- Key? key,
- required List<
Widget> tabs, - TabController? controller,
- bool isScrollable = false,
- EdgeInsetsGeometry? padding,
- Color? indicatorColor,
- bool automaticIndicatorColorAdjustment = true,
- double indicatorWeight = 2.0,
- EdgeInsetsGeometry indicatorPadding = EdgeInsets.zero,
- Decoration? indicator,
- TabBarIndicatorSize? indicatorSize,
- Color? dividerColor,
- Color? labelColor,
- TextStyle? labelStyle,
- EdgeInsetsGeometry? labelPadding,
- Color? unselectedLabelColor,
- TextStyle? unselectedLabelStyle,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- MaterialStateProperty<
Color?> ? overlayColor, - MouseCursor? mouseCursor,
- bool? enableFeedback,
- ValueChanged<
int> ? onTap, - ScrollPhysics? physics,
- InteractiveInkFeatureFactory? splashFactory,
- BorderRadius? splashBorderRadius,
Creates a Material Design secondary tab bar.
Secondary tabs are used within a content area to further separate related content and establish hierarchy.
{@tool dartpad} This sample showcases nested Material 3 PickerTabBars. It consists of a primary PickerTabBar with nested a secondary PickerTabBar. The primary PickerTabBar uses a DefaultTabController while the secondary PickerTabBar uses a TabController.
** See code in examples/api/lib/material/tabs/tab_bar.2.dart ** {@end-tool}
See also:
- PickerTabBar, for a primary tab bar.
- PickerTabBarView, which displays page views that correspond to each tab.
- TabController, which coordinates tab selection between a PickerTabBar and a PickerTabBarView.
- https://m3.material.io/components/tab-bar/overview, the Material 3 tab bar specification.
Implementation
const PickerTabBar.secondary({
super.key,
required this.tabs,
this.controller,
this.isScrollable = false,
this.padding,
this.indicatorColor,
this.automaticIndicatorColorAdjustment = true,
this.indicatorWeight = 2.0,
this.indicatorPadding = EdgeInsets.zero,
this.indicator,
this.indicatorSize,
this.dividerColor,
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.splashFactory,
this.splashBorderRadius,
}) : _isPrimary = false,
assert(indicator != null || (indicatorWeight > 0.0));