onPlatformBrightnessChanged property Null safety

VoidCallback? onPlatformBrightnessChanged

A callback that is invoked whenever platformBrightness changes value.

The framework invokes this callback in the same zone in which the callback was set.

See also:

Implementation

VoidCallback? get onPlatformBrightnessChanged => _onPlatformBrightnessChanged;
void onPlatformBrightnessChanged= (VoidCallback? callback)

Implementation

set onPlatformBrightnessChanged(VoidCallback? callback) {
  _onPlatformBrightnessChanged = callback;
  _onPlatformBrightnessChangedZone = Zone.current;
}