TextDirection class
Bidi stands for Bi-directional text. According to http://en.wikipedia.org/wiki/Bi-directional_text: Bi-directional text is text containing text in both text directionalities, both right-to-left (RTL) and left-to-right (LTR). It generally involves text containing different types of alphabets, but may also refer to boustrophedon, which is changing text directionality in each row.
This file provides some utility classes for determining directionality of text, switching CSS layout from LTR to RTL, and other normalizing utilities needed when switching between RTL and LTR formatting.
It defines the TextDirection class which is used to represent directionality of text, In most cases, it is preferable to use bidi_formatter.dart, which provides bidi functionality in the given directional context, instead of using bidi_utils.dart directly.
Properties
- spanText → String
-
Textual representation of the directionality when used in span tag.
final
- value → String
-
Textual representation of the directionality constant. One of
'LTR', 'RTL', or 'UNKNOWN'.
final
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
isDirectionChange(
TextDirection otherDirection) → bool -
Returns true if
otherDirection
is known to be different from this direction. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited
Constants
- LTR → const TextDirection
-
const TextDirection._('LTR', 'ltr')
- RTL → const TextDirection
-
const TextDirection._('RTL', 'rtl')
- UNKNOWN → const TextDirection
-
const TextDirection._('UNKNOWN', 'ltr')