GraphText constructor
GraphText({})
Creates a GraphText with the specified text
, textStyle
, and offset
.
Implementation
GraphText({
required this.text,
this.textStyle = const TextStyle(color: Colors.white),
required this.offset,
}) {
_textPainter = TextPainter(
text: TextSpan(
text: text,
style: textStyle,
),
textAlign: TextAlign.justify,
textDirection: TextDirection.ltr,
)..layout(minWidth: 10, maxWidth: 100);
}