parseTextAlign static method

TextAlign parseTextAlign(
  1. String textAlign
)

Implementation

static TextAlign parseTextAlign(String textAlign) {
  var align = TextAlign.start;
  if ("auto" == (textAlign)) {
    align = TextAlign.start;
  } else if ("left" == (textAlign)) {
    align = TextAlign.left;
  } else if ("right" == (textAlign)) {
    align = TextAlign.right;
  } else if ("center" == (textAlign)) {
    align = TextAlign.center;
  } else if ("justify" == (textAlign)) {
    align = TextAlign.justify;
  } else {
    LogUtils.e(_kTag, "Invalid textAlign: $textAlign");
  }
  return align;
}