didHaveMemoryPressure method
Called when the system is running low on memory.
Implementation
@protected
@override
@mustCallSuper
void didHaveMemoryPressure() {
// A triggered system event
_hadSystemEvent = true;
///
/// This method exposes the `memoryPressure` notification from
/// [SystemChannels.system].
/// No 'setState()' functions are allowed to fully function at this point.
_setStateAllowed = false;
for (final con in _controllerList) {
con.didHaveMemoryPressure();
}
_setStateAllowed = true;
if (_setStateRequested) {
_setStateRequested = false;
// Only the latest State is rebuilt
if (isEndState) {
/// Perform a 'rebuild' if requested.
setState(() {});
}
}
}