backgroundColor property
Background color of the legend.
Used to change the background color of legend shape.
Defaults to Colors.transparent.
Widget build(BuildContext context) {
  return SfCartesianChart(
    legend: Legend(
      isVisible: true,
      backgroundColor: Colors.grey
    )
  );
}
Implementation
final Color? backgroundColor;