maxObjectsForBytes static method
Maps a disk budget in bytes to the file cap, anchored so the default
budget keeps maxNrOfCacheObjects files. flutter_cache_manager
imposes no upper bound on the count, so there is no ceiling here — only
a floor of one file against a degenerate zero/negative raw value (the
resolved budget is already positive via SdkConfig).
Implementation
static int maxObjectsForBytes(int bytes) =>
max(1, bytes ~/ bytesPerCacheObject);