getTextExtent method
Returns the size if text when using the current font
Implementation
WxSize getTextExtent( String text )
{
TextPainter textPainter = TextPainter(
text: TextSpan(text: text, style: null), maxLines: 1, textDirection: TextDirection.ltr)
..layout(minWidth: 0, maxWidth: double.infinity);
return WxSize( textPainter.size.width.floor(), textPainter.size.height.floor() );
}