onTooltipRender property Null safety

ChartTooltipCallback? onTooltipRender

Occurs while tooltip is rendered. You can customize the position and header. Here, you can get the text, header, point index, series, x and y-positions.

Widget build(BuildContext context) {
   return Container(
       child: SfCartesianChart(
           tooltipBehavior: TooltipBehavior(enable: true)
           onTooltipRender: (TooltipArgs args) => tool(args)
void tool(TooltipArgs args) {
  args.locationX = 30;


final ChartTooltipCallback? onTooltipRender;