add method
Implementation
@override
Future<void> add(T nextValue, {bool clearUndo = true}) async {
if (_history.length == maxSize) {
_history.remove(_history.first);
}
_history.add(nextValue);
// if one new is added, the undo is invalid
if (clearUndo) _undoList.clear();
await notifyPersistence();
}