text method

SentenceDrawer<T> text(
  1. String content, [
  2. ColorD? color
])

Implementation

SentenceDrawer<T> text(String content, [ColorD? color]) {
  final width = _parent.backend.render.measureText(content, _parent._fontSize);
  _segments.add(_TextSegment(content, color, width));
  _totalWidth += width;
  return this;
}