title: How do you use a TextPainter to draw text?
body: <p>The <a href="https://docs.flutter.io/flutter/material/CustomPainter/paint.html" rel="noreferrer">documentation for CustomPainter's paint method</a> says, "To paint text on a <code>Canvas</code>, use a <code>TextPainter</code>". So within my <code>MyCustomPainter</code>'s paint method I have the following:</p>
  
  <pre><code>TextSpan span = new TextSpan(text: 'Yrfc');
  TextPainter tp = new TextPainter(text: span, textAlign: TextAlign.left);
  tp.layout();
  tp.paint(canvas, new Offset(5.0, 5.0));
  </code></pre>
  
  <p>I've tried a variety of offsets <code>(Offset.zero, Offset.infinite, new Offset(10.0, 10.0)</code> but I never am able to see the text painted on the screen.  </p>