writeStringStyled method

void writeStringStyled(
  1. int x,
  2. int y,
  3. String text,
  4. TextStyle? style,
)

Implementation

void writeStringStyled(int x, int y, String text, TextStyle? style) {
  int cx = x;
  for (int i = 0; i < text.length; i++) {
    final String ch = text[i];
    writeStyled(cx, y, ch, style);
    cx += charWidth(ch.codeUnitAt(0));
  }
}