TabView constructor

const TabView({
  1. required TabViewController controller,
  2. Key? key,
  3. ValueChanged<int>? onChanged,
  4. VoidCallback? onNewPressed,
  5. Widget newTabIcon = const WindowsIcon(WindowsIcons.add, fallbackIcon: FluentIcons.add),
  6. bool shortcutsEnabled = true,
  7. ReorderCallback? onReorder,
  8. bool showScrollButtons = true,
  9. ScrollPosController? scrollController,
  10. double minTabWidth = _kMinTileWidth,
  11. double maxTabWidth = _kMaxTileWidth,
  12. CloseButtonVisibilityMode closeButtonVisibility = CloseButtonVisibilityMode.always,
  13. TabWidthBehavior tabWidthBehavior = TabWidthBehavior.equal,
  14. Widget? header,
  15. Widget? footer,
  16. double? reservedStripWidth,
  17. Widget stripBuilder(
    1. BuildContext context,
    2. Widget strip
    )?,
  18. Duration closeDelayDuration = const Duration(seconds: 1),
  19. bool automaticallyKeepAlive = true,
})

Creates a tab view.

maxTabWidth must be non-negative

Implementation

const TabView({
  required this.controller,
  super.key,
  this.onChanged,
  this.onNewPressed,
  this.newTabIcon = const WindowsIcon(
    WindowsIcons.add,
    fallbackIcon: FluentIcons.add,
  ),
  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.reservedStripWidth,
  this.stripBuilder,
  this.closeDelayDuration = const Duration(seconds: 1),
  this.automaticallyKeepAlive = true,
});