crosshairBehavior property Null safety

CrosshairBehavior crosshairBehavior
final

Customizes the crosshair in chart.

CrosshairBehavior _crosshairBehavior;

@override
void initState() {
 _crosshairBehavior = CrosshairBehavior(enable: true);
 super.initState();
}

Widget build(BuildContext context) {
   return Container(
       child: SfCartesianChart(
           crosshairBehavior: _crosshairBehavior,
        )
    );
}

Implementation

final CrosshairBehavior crosshairBehavior;