onCreatePointerRenderer property
The callback that is called when the custom renderer for the needle pointer is created. and it is not applicable for built-in needle pointer
The needle pointer is passed as the argument to the callback in order to access the pointer property
Widget build(BuildContext context) {
return Container(
child: SfRadialGauge(
axes:<RadialAxis>[RadialAxis(
pointers: <GaugePointer>[NeedlePointer(value: 50,
onCreatePointerRenderer: handleCreatePointerRenderer,
)],
)]
));
}
Called before creating the renderer
NeedlePointerRenderer handleCreatePointerRenderer(NeedlePointer pointer){
final _CustomPointerRenderer _customPointerRenderer =
_CustomPointerRenderer();
return _customPointerRenderer;
}
class _CustomPointerRenderer extends NeedlePointerRenderer{
_CustomPointerRenderer class implementation
}
Implementation
final NeedlePointerRendererFactory<NeedlePointerRenderer>?
onCreatePointerRenderer;