SectionTabs class
Editorial 2–4 segment selector. Renders as a single rounded pill with
the active segment filled in t.ink and the inactive segments
transparent on t.surface. Supports keyboard navigation:
← / → to step, Home / End to jump, Enter / Space to commit.
Used to expose URL-only sub-views as on-screen tabs — the immediate
migration target is the Progress screen at
lib/presentation/screens/progress/progress_dashboard_screen.dart,
which has 3 sub-views (Overview / Domains / Notes) only reachable by
URL today. Also fits the Leaderboard time-range filter
(lib/presentation/screens/org/leaderboard_screen.dart) and the
Goals filter.
Example:
SectionTabs(
tabs: const [
SectionTab(id: 'overview', label: 'Overview'),
SectionTab(id: 'domains', label: 'Domains'),
SectionTab(id: 'notes', label: 'Notes'),
],
activeId: activeId,
onChanged: (id) => context.go('/progress/$id'),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SectionTabs
- Available extensions
Constructors
-
SectionTabs({Key? key, required List<
SectionTab> tabs, required String activeId, required ValueChanged<String> onChanged, SectionTabsSize size = SectionTabsSize.md, bool fullWidth = false}) -
const
Properties
- activeId → String
-
final
- fullWidth → bool
-
If true, the row stretches to its parent width and segments share
the available space evenly (good for full-width filter bars). If
false (default), segments size to their label.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onChanged
→ ValueChanged<
String> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → SectionTabsSize
-
final
-
tabs
→ List<
SectionTab> -
final
Methods
-
animate(
{Key? key, List< Effect> ? effects, AnimateCallback? onInit, AnimateCallback? onPlay, AnimateCallback? onComplete, bool? autoPlay, Duration? delay, AnimationController? controller, Adapter? adapter, double? target, double? value}) → Animate -
Available on Widget, provided by the AnimateWidgetExtensions extension
Wraps the target Widget in an Animate instance, and returns the instance for chaining calls. Ex.myWidget.animate()is equivalent toAnimate(child: myWidget). -
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< SectionTabs> -
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