CacheSizeOptions constructor

const CacheSizeOptions({
  1. int maxKb = CacheSizeConstants.defaultMaxKb,
  2. int maxMb = CacheSizeConstants.defaultMaxMb,
})

Constructor for creating cache size options with customizable maximum sizes. If no values are provided, it defaults to 0 KB for maxKb and 20 MB for maxMb.

  • Parameters:
    • maxKb: The maximum cache size in kilobytes. Must be non-negative.
    • maxMb: The maximum cache size in megabytes. Must be non-negative.

Implementation

const CacheSizeOptions({
  this.maxKb = CacheSizeConstants.defaultMaxKb,
  this.maxMb = CacheSizeConstants.defaultMaxMb,
})  : assert(maxKb >= 0, 'maxKb must be non-negative'),
      assert(maxMb > 0, 'maxMb must be non-negative');