You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Release v9.2.0: Add CommandBuilder auto-run and deprecate Command.toWidget()
New Features:
- CommandBuilder now supports automatically executing commands on first build
via runCommandOnFirstBuild parameter, eliminating StatefulWidget boilerplate
for simple data loading scenarios (especially useful for non-watch_it users)
- Added initialParam parameter to pass parameters when auto-running commands
Deprecations:
- Deprecated Command.toWidget() in favor of CommandResult.toWidget() which
provides a richer API with better separation of concerns (onData/onSuccess/
onNullData). Removal planned for v10.0.0.
Breaking Changes:
- CommandBuilder is now a StatefulWidget instead of StatelessWidget (should
not affect users as the widget API remains the same)
Copy file name to clipboardExpand all lines: CHANGELOG.md
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,49 @@
1
+
[9.2.0] - 2025-11-22
2
+
3
+
### New Features
4
+
5
+
-**CommandBuilder Auto-Run**: CommandBuilder now supports automatically executing commands on first build via `runCommandOnFirstBuild` parameter. This is especially useful for non-watch_it users who want self-contained data-loading widgets without needing StatefulWidget boilerplate.
6
+
7
+
```dart
8
+
CommandBuilder<String, List<Item>>(
9
+
command: searchCommand,
10
+
runCommandOnFirstBuild: true, // Executes in initState
- Eliminates StatefulWidget boilerplate for simple data loading
19
+
- Self-contained widgets that manage their own data fetching
20
+
- Runs only once in initState (not on rebuilds)
21
+
- Perfect for non-watch_it users (watch_it users should continue using `callOnce`)
22
+
23
+
### Deprecations
24
+
25
+
-**Deprecated Command.toWidget()**: The `Command.toWidget()` method is now deprecated in favor of `CommandResult.toWidget()`. The CommandResult version provides a richer API with better separation of concerns (onData/onSuccess/onNullData) and is already used by CommandBuilder. Command.toWidget() will be removed in v10.0.0.
Copy file name to clipboardExpand all lines: pubspec.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
name: command_it
2
2
description: command_it is a way to manage your state based on `ValueListenable` and the `Command` design pattern. It is a rebranding of flutter_command.
0 commit comments