textFieldMapper property Null safety

ChartIndexedValueMapper<String>? textFieldMapper
final, inherited

Maps the field name, which will be considered as text for data label.

Defaults to null

Widget build(BuildContext context) {
   return Container(
       child: SfFunnelChart(
           series: FunnelSeries<ChartData, String>(
              textFieldMapper: (ChartData data, _) => data.xVal,
            )
       ));
}
class ChartData {
  ChartData(this.xVal, this.yVal, [this.pointColor]);
  final String xVal;
  final int yVal;
  final Color pointColor;
}

Implementation

final ChartIndexedValueMapper<String>? textFieldMapper;