onValueChanging property Null safety

ValueChanged<ValueChangingArgs>? onValueChanging
final

Called during a drag when the user is selecting before a new value for the pointer by dragging.

This callback shouldn't be used to update the pointer value (use onValueChanged for that), but rather to know the new value before when the user has completed selecting a new value by drag.

To restrict the update of current drag pointer value, set ValueChangingArgs.cancel is true.

Widget build(BuildContext context) {
  return Container(
      child: SfRadialGauge(axes: <RadialAxis>[
    RadialAxis(
      pointers: <GaugePointer>[
        MarkerPointer(
            value: 50,
            onValueChanging: (ValueChangingArgs args) {
              setState(() {
                if (args.value > 10) {
                  args.cancel = false;
                }
              });
            })
      ],
    )
  ]));
}

Implementation

final ValueChanged<ValueChangingArgs>? onValueChanging;