onPlatformBrightnessChanged property

VoidCallback? get 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;
set onPlatformBrightnessChanged (VoidCallback? callback)

Implementation

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