TabView constructor
const
TabView({
- Key? key,
- required int currentIndex,
- ValueChanged<
int> ? onChanged, - required List<
Tab> tabs, - VoidCallback? onNewPressed,
- IconData? addIconData,
- Icon newTabIcon = const Icon(FluentIcons.add),
- Widget addIconBuilder(
- Widget addIcon
- bool shortcutsEnabled = true,
- ReorderCallback? onReorder,
- bool showScrollButtons = true,
- ScrollPosController? scrollController,
- double minTabWidth = _kMinTileWidth,
- double maxTabWidth = _kMaxTileWidth,
- CloseButtonVisibilityMode closeButtonVisibility = CloseButtonVisibilityMode.always,
- TabWidthBehavior tabWidthBehavior = TabWidthBehavior.equal,
- Widget? header,
- Widget stripBuilder(
- BuildContext context,
- Widget strip
- Duration closeDelayDuration = const Duration(seconds: 1),
Creates a tab view.
tabs
must have the same length as bodies
maxTabWidth
must be non-negative
Implementation
const TabView({
super.key,
required this.currentIndex,
this.onChanged,
required this.tabs,
this.onNewPressed,
this.addIconData,
this.newTabIcon = const Icon(FluentIcons.add),
this.addIconBuilder,
this.shortcutsEnabled = true,
this.onReorder,
this.showScrollButtons = true,
this.scrollController,
this.minTabWidth = _kMinTileWidth,
this.maxTabWidth = _kMaxTileWidth,
this.closeButtonVisibility = CloseButtonVisibilityMode.always,
this.tabWidthBehavior = TabWidthBehavior.equal,
this.header,
this.footer,
this.stripBuilder,
this.closeDelayDuration = const Duration(seconds: 1),
});