Movatterモバイル変換


[0]ホーム

URL:


menu
  1. Flutter
  2. widgets.dart
  3. FocusTraversalPolicy class
FocusTraversalPolicy
description

FocusTraversalPolicy classabstract

Determines how focusable widgets are traversed within aFocusTraversalGroup.

The focus traversal policy is what determines which widget is "next","previous", or in a direction from the widget associated with the currentlyfocusedFocusNode (usually aFocus widget).

One of the pre-defined subclasses may be used, or define a custom policy tocreate a unique focus order.

When defining your own, your subclass should implementsortDescendants toprovide the order in which you would like the descendants to be traversed.

See also:

Mixed-in types
Implementers
Annotations

Constructors

FocusTraversalPolicy({TraversalRequestFocusCallback?requestFocusCallback})
Abstract const constructor. This constructor enables subclasses to provideconst constructors so that they can be used in const expressions.
const

Properties

hashCodeint
The hash code for this object.
no setterinherited
requestFocusCallbackTraversalRequestFocusCallback
The callback used to move the focus from one focus node to another whentraversing them using a keyboard. By default it requests focus on the nextnode and ensures the node is visible if it's in a scrollable.
final
runtimeTypeType
A representation of the runtime type of the object.
no setterinherited

Methods

changedScope({FocusNode?node,FocusScopeNode?oldScope})→ void
This is called whenever the givennode is re-parented into a new scope,so that the policy has a chance to update or invalidate any cached datathat it maintains per scope about the node.
debugFillProperties(DiagnosticPropertiesBuilderproperties)→ void
Add additional properties associated with the node.
inherited
findFirstFocus(FocusNodecurrentNode, {boolignoreCurrentFocus =false})FocusNode?
Returns the node that should receive focus if focus is traversingforwards, and there is no current focus.
findFirstFocusInDirection(FocusNodecurrentNode,TraversalDirectiondirection)FocusNode?
Returns the first node in the givendirection that should receive focusif there is no current focus in the scope to which thecurrentNodebelongs.
findLastFocus(FocusNodecurrentNode, {boolignoreCurrentFocus =false})FocusNode
Returns the node that should receive focus if focus is traversingbackwards, and there is no current focus.
inDirection(FocusNodecurrentNode,TraversalDirectiondirection)bool
Focuses the next widget in the givendirection in the focus scope thatcontains the givencurrentNode.
invalidateScopeData(FocusScopeNodenode)→ void
Clears the data associated with the givenFocusScopeNode for this object.
next(FocusNodecurrentNode)bool
Focuses the next widget in the focus scope that contains the givencurrentNode.
noSuchMethod(Invocationinvocation)→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
previous(FocusNodecurrentNode)bool
Focuses the previous widget in the focus scope that contains the givencurrentNode.
sortDescendants(Iterable<FocusNode>descendants,FocusNodecurrentNode)Iterable<FocusNode>
Sorts the givendescendants into focus order.
toDiagnosticsNode({String?name,DiagnosticsTreeStyle?style})DiagnosticsNode
Returns a debug representation of the object that is used by debuggingtools and byDiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevelminLevel =DiagnosticLevel.info})String
A string representation of this object.
inherited
toStringShort()String
A brief description of this object, usually just theruntimeType and thehashCode.
inherited

Operators

operator ==(Objectother)bool
The equality operator.
inherited

Static Methods

defaultTraversalRequestFocusCallback(FocusNodenode, {ScrollPositionAlignmentPolicy?alignmentPolicy,double?alignment,Duration?duration,Curve?curve})→ void
The default value forrequestFocusCallback.Requests focus fromnode and ensures the node is visibleby callingScrollable.ensureVisible.
  1. Flutter
  2. widgets
  3. FocusTraversalPolicy class
widgets library

[8]ページ先頭

©2009-2026 Movatter.jp