maxSizeBytes property
int?
get
maxSizeBytes
The soft upper bound, in bytes, for the images held by this cache.
When a load pushes the cache over this budget, eligible images are disposed in least recently used order until the cache fits again. Images that are retained, or that were used within gracePeriod, are never evicted, so the cache can exceed the budget while they are needed.
When null, which is the default, no automatic eviction happens.
Implementation
int? get maxSizeBytes => _maxSizeBytes;
set
maxSizeBytes
(int? value)
Implementation
set maxSizeBytes(int? value) {
_maxSizeBytes = value;
_enforceBudget();
}