nextFocus method

  1. @mustBeOverridden
bool nextFocus(
  1. String nodeId
)

Moves the focus to the next focusable node in the traversal order relative to the node identified by nodeId.

Returns true if the focus was successfully moved, or false if there was no next node to move to.

Implementations should resolve the FocusNode associated with nodeId and call its underlying nextFocus() method, or use a platform-appropriate mechanism to advance focus in the forward direction. This is typically used for keyboard navigation (e.g., tab key) or programmatic focus traversal in forms, menus, or interactive interfaces.

Throws MissingCapabilityMethodImplementation if not overridden.

See also:

Implementation

@mustBeOverridden
bool nextFocus(String nodeId) =>
    throw const MissingCapabilityMethodImplementation(
      "nextFocus",
      "FocusCapabilityDelegate",
    );