LegendTitle constructor

LegendTitle({
  1. String? text,
  2. TextStyle? textStyle,
  3. ChartAlignment? alignment,
})

Creating an argument constructor of LegendTitle class.

Implementation

LegendTitle({this.text, TextStyle? textStyle, ChartAlignment? alignment})
    : textStyle = getTextStyle(
          textStyle: textStyle,
          fontSize: 12.0,
          fontStyle: FontStyle.normal,
          fontFamily: 'Segoe UI'),
      alignment = alignment ?? ChartAlignment.center;