CsTabs class
Cloudscape's Tabs: switches between panels of related content.
CsTabs(
activeTabId: tab,
onChange: (id) => setState(() => tab = id),
tabs: const [
CsTab(id: 'details', label: 'Details', content: Text('Instance details')),
CsTab(id: 'monitoring', label: 'Monitoring', content: Text('Metrics')),
CsTab(id: 'tags', label: 'Tags', disabled: true, disabledReason: 'No tags yet.'),
],
)
Uncontrolled when activeTabId is null (starts on the first enabled
tab). Labels are 16px bold color-text-interactive-default, the active
one color-text-accent over a 4px rounded color-border-tabs-underline
indicator that slides between tabs (motion-duration-expressive).
The tab row scrolls when it overflows and shows start and end arrow
buttons, which matters most on phones. Arrow keys, Home and End move
between tabs. Set swipeable to change tabs with a horizontal swipe on
the content.
- Inheritance
Constructors
-
CsTabs({Key? key, required List<
CsTab> tabs, String? activeTabId, ValueChanged<String> ? onChange, CsTabsVariant variant = CsTabsVariant.defaultVariant, Widget? actions, bool disableContentPaddings = false, bool fitHeight = false, CsTabsKeyboardActivation keyboardActivationMode = CsTabsKeyboardActivation.automatic, CsTabsI18nStrings i18nStrings = const CsTabsI18nStrings(), String? semanticLabel, bool swipeable = false, CsStackPosition stackPosition = CsStackPosition.only}) -
const
Properties
- actions → Widget?
-
Controls at the end of the tab row.
final
- activeTabId → String?
-
Controlled active tab. Null makes the tabs manage it.
final
- disableContentPaddings → bool
-
final
- fitHeight → bool
-
Fill the parent's height; the panel scrolls. Needs a bounded height.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- i18nStrings → CsTabsI18nStrings
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyboardActivationMode → CsTabsKeyboardActivation
-
final
-
onChange
→ ValueChanged<
String> ? -
Called with the id of the tab the user selects.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
Name of the tab list (Cloudscape
ariaLabel).final - stackPosition → CsStackPosition
-
Position in a stack of CsTabsVariant.stacked containers.
final
- swipeable → bool
-
Change tabs with a horizontal swipe on the content.
final
-
tabs
→ List<
CsTab> -
final
- variant → CsTabsVariant
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CsTabs> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited