maximumSize property

int? get maximumSize

Gets the maximum number of logs to store or null for unlimited storage.

If more logs arrive, the oldest ones (based on their InfospectLog.timestamp) will be removed.

Implementation

int? get maximumSize => _maximumSize;
set maximumSize (int? value)

Sets the maximum number of logs to store or null for unlimited storage.

If the new maximum size is smaller than the current number of logs, the oldest logs will be removed.

Implementation

set maximumSize(int? value) {
  var logs = callsSubject.value;
  _maximumSize = maximumSize;

  if (value != null && logs.length > value) {
    callsSubject.add([...logs.sublist(logs.length - value, logs.length)]);
  }
}