Given a text String, returns the width of that text.
text
@override double measureTextWidth(String text) { return toTextPainter(text).width; }