Skip to content

Commit eddcfc4

Browse files
committed
Fix undoOnExecutionFailure default value to true
Corrected default value in createUndoable signature: - undoOnExecutionFailure defaults to true, not false - This means auto-undo on failure is enabled by default for undoable commands - Makes sense for optimistic update pattern Verified against source: command_it.dart lines 1439, 1504, 1571, 1639
1 parent a961662 commit eddcfc4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/documentation/command_it/command_types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static UndoableCommand<TParam, TResult, TUndoState> createUndoable<TParam, TResu
140140
ValueListenable<bool>? restriction,
141141
RunInsteadHandler<TParam>? ifRestrictedRunInstead,
142142
bool includeLastResultInCommandResults = false,
143-
bool undoOnExecutionFailure = false,
143+
bool undoOnExecutionFailure = true,
144144
ErrorFilter? errorFilter,
145145
ErrorFilterFn? errorFilterFn,
146146
bool notifyOnlyWhenValueChanges = false,

0 commit comments

Comments
 (0)