maxHistoryLength property

int? maxHistoryLength
inherited

How many values to keep track of.

If null, all values will be stored.

Implementation

int? get maxHistoryLength => _maxHistoryLength;
void maxHistoryLength=(int? value)
inherited

Implementation

set maxHistoryLength(int? value) {
  assert(
    value == null || value >= 0,
    "The maxHistoryLength can't be negative!",
  );
  _maxHistoryLength = value;
  if (value == null) return;
  if (_undoHistory.length > value) {
    _undoHistory = _undoHistory.sublist(0, value);
    _undoIndex = _undoIndex >= value ? value - 1 : _undoIndex;
  }
}