set method
Set the current value by a method
Implementation
@override
bool set(
T val, {
bool force = false,
}) {
final prev = super.value;
final updated = super.set(val, force: force);
if (!updated) return false;
_undo.addLast((previousValue: prev, value: val));
_redo.clear();
if (limit != null && _undo.length > limit!) {
_undo.removeFirst();
}
return true;
}