Parses a short text-direction token into a typed TextWritingDirection.
A "parse a short enum token from config / JSON / locale data" helper for the
universal 'ltr' / 'rtl' direction strings. Nothing app-specific: these
are the CSS/HTML/Unicode direction tokens, so the parser is general-purpose
for turning a persisted or transmitted direction string back into a value.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
tryParse(
String? value) → TextWritingDirection? -
Parses
'ltr'/'rtl'(case-insensitive, whitespace-trimmed) into a TextWritingDirection; returns null for anything else — never throws.