usePlatformBrightness function Null safety

Brightness usePlatformBrightness()

Returns the current platform Brightness value and rebuilds the widget when it changes.

Implementation

Brightness usePlatformBrightness() {
  return use(const _PlatformBrightnessHook(rebuildOnChange: true));
}