didHaveMemoryPressure method

  1. @override
void didHaveMemoryPressure()
override

Called when the system is running low on memory.

This method exposes the memoryPressure notification from SystemChannels.system.

Implementation

@override
void didHaveMemoryPressure() {
  if (config.ignoreBackgroundPressure && _isInBackground) return;
  cache.evictFraction(config.criticalEvictionFraction);
}