didChangePlatformBrightness method
Called when the platform brightness changes.
Implementation
@protected
@override
@mustCallSuper
void didChangePlatformBrightness() {
/// No 'setState()' functions are allowed to fully function at this point.
_rebuildAllowed = false;
for (final listener in _beforeList) {
listener.didChangePlatformBrightness();
}
for (final con in _controllerList) {
con.didChangePlatformBrightness();
}
for (final listener in _afterList) {
listener.didChangePlatformBrightness();
}
_rebuildAllowed = true;
if (_rebuildRequested || _inTester) {
_rebuildRequested = false;
/// Perform a 'rebuild' if requested.
refresh();
}
}