didHaveMemoryPressure method
Called when the system is running low on memory.
Implementation
@protected
@override
@mustCallSuper
void didHaveMemoryPressure() {
///
/// This method exposes the `memoryPressure` notification from
/// [SystemChannels.system].
/// No 'setState()' functions are allowed to fully function at this point.
_rebuildAllowed = false;
for (final listener in _beforeList) {
listener.didHaveMemoryPressure();
}
for (final con in _controllerList) {
con.didHaveMemoryPressure();
}
for (final listener in _afterList) {
listener.didHaveMemoryPressure();
}
_rebuildAllowed = true;
if (_rebuildRequested || _inTester) {
_rebuildRequested = false;
/// Perform a 'rebuild' if requested.
refresh();
}
}