builder property Null safety

ChartWidgetBuilder? builder
final

Builder for data label.

Defaults to null.

Widget build(BuildContext context) {
  return SfCartesianChart(
    series: <SplineSeries<SalesData, num>>[
      SplineSeries<SalesData, num>(
        dataLabelSettings: DataLabelSettings(
          isVisible: true,
          builder: (dynamic data, dynamic point, dynamic series, int pointIndex, int seriesIndex) {
            return Container(
              height: 30,
              width: 30,
              child: Image.asset('images/horse.jpg')
            );
          }
        )
      ),
    ],
  );
}

Implementation

final ChartWidgetBuilder<dynamic>? builder;