discontinuedPackage fluttersdk_telescope has been discontinued and replaced by crumbs.

setCapacity static method

void setCapacity(
  1. int cap, {
  2. TelescopeKind? kind,
})

Set the capacity of every buffer but frame perf (default 500), or of the one buffer kind names.

A kind cap wins over the shared one whichever was set last, and the shared call leaves it alone. A cap below the current length trims on the next record, not retroactively. Zero or negative keeps nothing.

Implementation

static void setCapacity(int cap, {TelescopeKind? kind}) {
  if (kind == null) {
    _cap = cap;
  } else if (kind == TelescopeKind.framePerf) {
    _framePerfCap = cap;
  } else {
    _kindCaps[kind] = cap;
  }
}