dataflow 2.0.0-beta.5
dataflow: ^2.0.0-beta.5 copied to clipboard
A reactive state management library for Flutter with a simple and intuitive API which allows you to build Flutter applications with ease.
2.0.0-beta.5 - 2025-02-06 #
2.0.0-beta.4 - 2025-02-06 #
New Features - DataFlow Inspector 🔍 #
A powerful visual debugging tool for DataFlow applications.
- Actions Panel - Real-time view of all dispatched actions with status (loading/success/error/cancelled)
- Time Travel Debugging - Step through state snapshots captured after each action completes
- Insights Panel - Automatic detection of:
- Slow actions (>5s)
- Rapid-fire action calls (potential debounce needed)
- Repeated failures
- Excessive widget rebuilds
- Retry/Replay Actions - Re-run failed or successful actions directly from inspector
- Bug Report Capture - Screenshot + state + action history export
- State Popup - Tap any DataSync widget to inspect its state and subscribed actions
New APIs #
DataFlowInspectorwidget - Wrap yourMaterialAppto enable visual debuggingRetryable<T>mixin - Add to actions to enable retry/replay from inspectorRetryableActioninterface - Non-generic base for runtime type checking
Inspector Usage #
DataFlowInspector(
enabled: true, // Disable in production
child: MaterialApp(...),
)
Retryable Actions #
class LoadDataAction extends DataAction<AppStore> with Retryable<AppStore> {
@override
DataAction<AppStore> retry() => LoadDataAction();
@override
Future<void> execute() async { ... }
}
Bug Fixes #
- Fixed action tracking for concurrent actions of same type
- Fixed duplicate loading entries when
DataFlow.notify()called multiple times - Fixed
SelectableTextoverlay error in inspector (replaced withText) - Fixed
ScaffoldMessengernot found error in bug report dialog
Documentation #
- Added
DATAFLOW.md- Comprehensive LLM context file for Claude Code, Cursor, etc. - Complex real-world example app with auth, feed, search, notifications, and settings
2.0.0-beta.2 - 2025-02-06 #
Documentation #
- Complete rewrite of README with comprehensive documentation
- Added table of contents for easy navigation
- Added "Why DataFlow?" section with design principles
- Step-by-step Quick Start guide
- Detailed Core Concepts explanations
- Three complete guides: Todo App, Authentication Flow, Pagination
- Advanced Features section: Middleware, Chaining, Cancellation, Reset
- Comparison table with Bloc, Provider, Riverpod, GetX
- Complete API Reference tables
- Best Practices section with code examples
- FAQ section
- Migration guide reference
2.0.0-beta.1 - 2025-02-06 #
Breaking Changes #
See MIGRATION.md for detailed upgrade guide.
DataSync.actionsis now required - Previously nullable, now must be providederrorBuildersignature changed - Now receivesObjectinstead ofExceptionDataAction.errortype changed - NowObject?instead ofException?areAllActionsSuccessfulbehavior changed - Returnsfalsewhen empty (wastrue)- Loading state always emitted - Even for synchronous actions
New Features #
- Action Cancellation - Call
action.cancel()to cancel running actions - New
cancelledstatus -DataActionStatus.cancelledfor cancelled actions - Stack trace support -
errorStackTraceon actions,getStackTrace()on state isAnyActionCancelledgetter - Check if any action was cancelledfirstActionStackTracegetter - Get stack trace of first failed action- Await action completion - Use
action.futureto wait for action to complete
Performance Improvements #
- Cached stream - Stream is now created once in
initStateinstead of everybuild()
Bug Fixes #
- Catches all error types - Now catches
Object(bothExceptionandError) - Post actions cleared on error -
_postDataActionscleared when action fails
1.6.0 - 2025-02-06 #
New Features #
- Added
DataFlow.reset()method for full reinitialization (useful for logout scenarios) - Added
DataFlow.removeMiddleware()method to remove specific middleware - Added
DataFlow.clearMiddlewares()method to clear all middlewares - Added
DataFlow.isDisposedgetter to check if DataFlow has been disposed - Added
context.tryDataSync<T>()method that returns null instead of throwing
Improvements #
- Better error messages when
DataSync.actionsis null - Better error messages when
context.dataSync()has no ancestor - Controller is now recoverable after
dispose()usingreset()
1.5.1 - 2025-02-06 #
Documentation #
- Added examples for
resetStatus(),resetAllStatuses(), andgetError()methods - Added example for dynamic actions with
didUpdateWidget - Updated package version in README
1.5.0 - 2025-02-06 #
Bug Fixes #
- Fixed null error in DataSync when multiple actions are triggered and one fails while another succeeds
- Error handling now properly tracks errors per action type instead of relying on stream snapshot
New Features #
- Added
resetStatus(Type actionType)method to reset a specific action's status to idle - Added
resetAllStatuses()method to reset all action statuses to idle - Added
getError(Type actionType)method to get the error for a specific action type - Added
didUpdateWidgethandler to DataSync - now properly re-subscribes when actions change - Added
didUpdateWidgethandler to DataSyncNotifier - now properly re-subscribes when actions change
Internal Improvements #
- Errors are now stored in a separate
_allActionsErrorsmap for reliable error retrieval - Added
firstActionErrorgetter that returns the error from the first failed action
1.4.0 - 2024-10-14 #
- DataSyncWidget improved with more simplicity and better error control
- Bug Fixes
1.2.2 - 2024-08-14 #
Breaking change (Data Sync builder now gives hasData in place of statues) #
- context.dataSync() gives access to action bases status
- context.getStore() gives access to store
- DataFlowException added to handle data flow errors
- Bug Fixes
1.1.1 - 2024-08-05 #
- Added disableErrorBuilder and disableLoadingBuilder props
- actionNotifier now gives an action
- Bug Fixes
1.0.3 - 2024-07-23 #
- Bug Fixes
1.0.2 - 2024-07-08 #
- First Release