Commit 75b39fa
committed
Add Progress Control feature (v9.4.0)
Adds built-in progress tracking, status messages, and cooperative cancellation
to commands via ProgressHandle.
New Features:
- ProgressHandle class with progress (0.0-1.0), statusMessage, and isCanceled properties
- 8 new factory methods: createAsyncWithProgress and createUndoableWithProgress variants
- New Command properties: progress, statusMessage, isCanceled, cancel()
- MockCommand progress simulation support with updateMockProgress(), updateMockStatusMessage(), mockCancel()
- Zero-overhead design: Commands without progress use static default notifiers
Technical Details:
- Non-nullable API using static default notifiers for commands without handles
- Cooperative cancellation pattern (ValueListenable-based for external integration)
- Full test coverage: 23 passing tests including MockCommand simulation
- Compatible with external cancellation tokens (e.g., Dio CancelToken)
Breaking Changes: None (fully backward compatible)1 parent 3e356e6 commit 75b39fa
File tree
6 files changed
+1449
-1
lines changed- lib
- test
6 files changed
+1449
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
1 | 57 | | |
2 | 58 | | |
3 | 59 | | |
| |||
0 commit comments