TraversalEdgeBehavior enum

Controls the transfer of focus beyond the first and the last items of a FocusScopeNode.

This enumeration only controls the traversal behavior performed by FocusTraversalPolicy. Other methods of focus transfer, such as direct calls to FocusNode.requestFocus and FocusNode.unfocus, are not affected by this enumeration.

See also:





closedLoop → const TraversalEdgeBehavior

Keeps the focus among the items of the focus scope.

Requesting the next focus after the last focusable item will transfer the focus to the first item, and requesting focus previous to the first item will transfer the focus to the last item, thus forming a closed loop of focusable items.

leaveFlutterView → const TraversalEdgeBehavior

Allows the focus to leave the FlutterView.

Requesting next focus after the last focusable item or previous to the first item will unfocus any focused nodes. If the focus traversal action was initiated by the embedder (e.g. the Flutter Engine) the embedder receives a result indicating that the focus is no longer within the current FlutterView. For example, NextFocusAction invoked via keyboard (typically the TAB key) would receive KeyEventResult.skipRemainingHandlers allowing the embedder handle the shortcut. On the web, typically the control is transferred to the browser, allowing the user to reach the address bar, escape an iframe, or focus on HTML elements other than those managed by Flutter.

parentScope → const TraversalEdgeBehavior

Allows focus to traverse up to parent scope.

When reaching the edge of the current scope, requesting the next focus will look up to the parent scope of the current scope and focus the focus node next to the current scope.

If there is no parent scope above the current scope, fallback to closedLoop behavior.


hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.


values → const List<TraversalEdgeBehavior>
A constant List of the values in this enum, in order of their declaration.