GraphText constructor

GraphText({
  1. required String text,
  2. TextStyle textStyle = const TextStyle(color: Colors.white),
  3. required Offset offset,
})

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);
}