textAlign method

void textAlign(
  1. TextAlignHorizontal horizontalAlignment, [
  2. TextAlignVertical? verticalAlignment
])

Set the horizontal and vertical text alignment for text that's painted with the text() method.

Implementation

void textAlign(TextAlignHorizontal horizontalAlignment, [TextAlignVertical? verticalAlignment]) {
  _textAlignHorizontal = horizontalAlignment;
  _textAlignVertical = verticalAlignment ?? TextAlignVertical.baseline;
}