textStyle property Null safety

TextStyle textStyle
final

Customizes the legend item text.

Used to change the text color, size, font family, font style, etc.

Widget build(BuildContext context) {
  return SfCartesianChart(
    legend: Legend(
      isVisible: true,
      textStyle: TextStyle(color: Colors.red)
    )
  );
}

Implementation

final TextStyle textStyle;