Creates a text painter that paints the given text.
The text argument is optional but text
must be non-null before calling
layout.
Source
TextPainter({ TextSpan text, TextAlign textAlign, double textScaleFactor: 1.0, String ellipsis, }) : _text = text, _textAlign = textAlign, _textScaleFactor = textScaleFactor, _ellipsis = ellipsis { assert(text == null || text.debugAssertIsValid()); assert(textScaleFactor != null); }