textStyle property

TextStyle textStyle
final

Customizes the legend item text.

Used to change the text color, size, font family, fontStyle, and font weight.

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

Implementation

final TextStyle textStyle;