TextDirection

Base direction of a paragraph.

Direction affects which edge TextAlign.Start / End anchor to and which side justification leaves ragged. Glyph-level bidi reordering and Arabic shaping happen in the platform backends (Android and iOS shape natively; the JVM backend runs its own bidi + shaping pass), so the common layout layer only needs the paragraph's base direction.

Entries

Link copied to clipboard

Detect from the first strong directional character — Hebrew or Arabic content flips the paragraph to RTL automatically. The default, and the right choice for user-supplied content.

Link copied to clipboard

Force left-to-right regardless of content.

Link copied to clipboard

Force right-to-left regardless of content.

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Resolves TextDirection.Auto against actual text: the first strong directional character wins, mirroring the UAX#9 paragraph-level rule. Strings with no strong characters (digits, punctuation) read as LTR.

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.