textDirectionToAxisDirection function
- TextDirection textDirection
Returns the AxisDirection in which reading occurs in the given TextDirection.
Specifically, returns AxisDirection.left for TextDirection.rtl and AxisDirection.right for TextDirection.ltr.
Implementation
AxisDirection textDirectionToAxisDirection(TextDirection textDirection) {
return switch (textDirection) {
TextDirection.rtl => AxisDirection.left,
TextDirection.ltr => AxisDirection.right,
};
}