navigationMode property Null safety

NavigationMode navigationMode

Describes the navigation mode requested by the platform.

Some user interfaces are better navigated using a directional pad (DPAD) or arrow keys, and for those interfaces, some widgets need to handle these directional events differently. In order to know when to do that, these widgets will look for the navigation mode in effect for their context.

For instance, in a television interface, NavigationMode.directional should be set, so that directional navigation is used to navigate away from a text field using the DPAD. In contrast, on a regular desktop application with the navigationMode set to NavigationMode.traditional, the arrow keys are used to move the cursor instead of navigating away.

The NavigationMode values indicate the type of navigation to be used in a widget subtree for those widgets sensitive to it.


final NavigationMode navigationMode;