textDirection property Null safety

TextDirection? textDirection
final

The text direction to use for rendering the icon.

If this is null, the ambient Directionality is used instead.

Some icons follow the reading direction. For example, "back" buttons point left in left-to-right environments and right in right-to-left environments. Such icons have their IconData.matchTextDirection field set to true, and the Icon widget uses the textDirection to determine the orientation in which to draw the icon.

This property has no effect if the icon's IconData.matchTextDirection field is false, but for consistency a text direction value must always be specified, either directly using this property or using Directionality.

Implementation

final TextDirection? textDirection;