dispose method

void dispose()

Release resources held by this painter.

After calling this method, this object is no longer usable.

Implementation

void dispose() {
  assert(debugMaybeDispatchDisposed(this));
  _textPainter?.dispose();
  _textPainter = null;
}