parseTextAlign function
Implementation
TextAlign parseTextAlign(String? textAlignString) {
//left the system decide
TextAlign textAlign = TextAlign.start;
switch (textAlignString) {
case "left":
textAlign = TextAlign.left;
break;
case "right":
textAlign = TextAlign.right;
break;
case "center":
textAlign = TextAlign.center;
break;
case "justify":
textAlign = TextAlign.justify;
break;
case "start":
textAlign = TextAlign.start;
break;
case "end":
textAlign = TextAlign.end;
break;
default:
textAlign = TextAlign.start;
}
return textAlign;
}