onCreatePointerRenderer property
The callback that is called when the custom renderer for the marker pointer is created. and it is not applicable for built-in marker pointer
The marker 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>[MarkerPointer(value: 50,
onCreatePointerRenderer: handleCreatePointerRenderer,
)],
)]
));
}
Called before creating the renderer
MarkerPointerRenderer handleCreatePointerRenderer(MarkerPointer pointer){
final _CustomPointerRenderer _customPointerRenderer =
_CustomPointerRenderer();
return _customPointerRenderer;
}
class _CustomPointerRenderer extends MarkerPointerRenderer{
_CustomPointerRenderer class implementation
}
Implementation
final MarkerPointerRendererFactory<MarkerPointerRenderer>?
onCreatePointerRenderer;