SwitchTab class final

Switches the active navigation branch (tab).

Does not modify either branch's stack — it only flips the active branch pointer on the navigation controller. Each branch preserves its own stack independently.

When thenNavigate is provided, the controller switches to targetBranchId and then immediately applies thenNavigate on the new branch's stack. This mirrors the common "switch tab then push a screen" pattern in a single action.

Inheritance

Constructors

SwitchTab(NavigationBranchId targetBranchId, {NavigationType? thenNavigate, bool skipKeyboardDismissal = false})
const

Properties

analyticsName String
Stable identifier for analytics and breadcrumbs.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
skipKeyboardDismissal bool
If true, the keyboard dismissal will be skipped before the navigation.
final
targetBranchId NavigationBranchId
The branch to switch to.
final
thenNavigate NavigationType?
Optional navigation to apply on the new branch after switching.
final

Methods

Returns the current stack unchanged — SwitchTab does not modify stack contents; the controller handles the branch pointer flip.
override
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