textDirectionToAxisDirection function
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) {
assert(textDirection != null);
switch (textDirection) {
case TextDirection.rtl:
return AxisDirection.left;
case TextDirection.ltr:
return AxisDirection.right;
}
return null;
}