OnTabLongPress<T> typedef

OnTabLongPress<T> = void Function(ScrollerSection<T> section, int index)

Callback fired when a tab is long-pressed.

Parameters:

  • section - The section data for the long-pressed tab
  • index - Zero-based index of the long-pressed tab

Use Cases:

  • Show context menus
  • Enable drag-to-reorder mode
  • Display section options/settings
  • Show preview or tooltip

Example:

onTabLongPress: (section, index) {
  showContextMenu(context, section);
}

Implementation

typedef OnTabLongPress<T> = void Function(ScrollerSection<T> section, int index);