height property
Constructs a TextPainter and uses the calculated TextPainter.height with the defaultPadding to calculate the height of the widget.
Implementation
@override
double get height =>
(TextPainter(
text: TextSpan(
text: title,
style: textStyle ?? TextStyle(fontWeight: defaultFontWeight),
),
maxLines: 1,
)..layout())
.height +
defaultPadding * 2;