WorkbenchPanelTab class
Descriptor for one tab in a WorkbenchTabbedPanel.
Apps build the descriptor list and pass it to the primitive. The primitive owns the TabController, the tab strip, the close button, header spacing, and the tab content area; the descriptor only carries identity, label string, optional badge, and the content builder.
Canonical rendering. Per §spec:capability-boundary of the workbench_shell spec, tabs
render uppercase regardless of how the consumer cases the input.
Hosts pass natural-case labels ('Output', 'Debug Console')
and the shell paints 'OUTPUT' / 'DEBUG CONSOLE'. Hosts that
want a count-style badge supply badge as a typed
PanelTabBadge carrying the count; the shell paints the inline
pill in the panel-active accent colour (matching the active-tab
underline) — VS Code does not vary the badge by severity.
Badges that don't fit the count-only shape belong in the panel
content, not the tab strip — there is no widget escape hatch.
- Annotations
Constructors
- WorkbenchPanelTab({required String id, required String label, required WidgetBuilder contentBuilder, PanelTabBadge? badge})
-
const
Properties
- badge → PanelTabBadge?
-
Optional inline badge rendered next to the label.
final
- contentBuilder → WidgetBuilder
-
Builds the body for this tab. Called once per build cycle the
tab is laid out — the primitive does not cache the result.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Stable id used by hosts to focus a tab via
WorkbenchTabbedPanel.onRegisterFocusTab.
final
- label → String
-
Natural-case label rendered uppercase by the shell.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited