widget property

Widget widget
final

Considers any widget as annotation.

Defaults to null.

Widget build(BuildContext context) {
   return Container(
       child: SfCartesianChart(
           annotations: <CartesianChartAnnotation>[
               CartesianChartAnnotation(
                   widget: Container(
                   child: const Text('Annotation')),
                   coordinateUnit: CoordinateUnit.point,
                   region: AnnotationRegion.chart,
                   x: 3,
                   y: 60
                ),
            ],
       )
   );
}

Implementation

final Widget widget;