getAlign method
CrossAxisAlignment from align
Implementation
CrossAxisAlignment getAlign(BuildContext context) {
final direction = Directionality.of(context);
switch (effectiveStyle.align) {
case TextAlign.start:
if (direction == TextDirection.ltr) {
return CrossAxisAlignment.start;
} else {
return CrossAxisAlignment.end;
}
case TextAlign.end:
if (direction == TextDirection.rtl) {
return CrossAxisAlignment.start;
} else {
return CrossAxisAlignment.end;
}
case TextAlign.center:
return CrossAxisAlignment.center;
case TextAlign.right:
return CrossAxisAlignment.end;
case TextAlign.left:
case TextAlign.justify:
default:
return CrossAxisAlignment.start;
}
}