result_notifier 0.6.0
result_notifier: ^0.6.0 copied to clipboard
Pragmatic quality-of-life enhancements to vanilla Flutter state management
0.6.0 #
- BREAKING: Updated
Dataconstructor to use named parameters for better algebraic data type support. - Added
immediateparameter to effect & asyncEffect methods on ResultListenable mixin/base class.
0.5.0 #
- BREAKING: Removed methods
when,whenOrandwhenDatafromResult- replace with pattern matching (i.e.switch) onResult. - BREAKING: Removed
ResultBuilder- replace withValueListenableBuilder, methodbuilder(onResultNotifierorResultListenable) or thewatchmethod (onResultNotifierorValueListenable). - BREAKING:
futuregetter inResultNotifierwill now only return a value onisDatainstead ofhasData. - Added
futuresetter inResultNotifier. - Removed Disposer typedef and replaced with VoidCallback.
0.4.1+1 #
- Added relevant topics to
pubspec.yaml.
0.4.1 #
- Added
updateDataAsynctoResultNotifier, to update the data of aResultNotifierasynchronously without having to handle potential exceptions (i.e. the returned Future can be safely ignored, or awaited without try/catch).
0.4.0 #
- Removed
ResultNotifierProvider. - Updated
ResourceProviderto useWatcherContextinstead ofBuildContext(in builder and build), to make watching easier.
0.3.0+1 #
- Just documentation updates.
0.3.0 #
- Added "watch" functionality, i.e. the possibility to observe a
ResultNotifier(or anyListenable) in a Widget without using aResultBuilderorValueListenableBuilder(a bit similar to howflutter_hooksworks). - Added extension methods on
Iterable<Result>andIterable<ResultNotifier>for combining multipleResults into a singleResult, or just combining the data (similar toCombineLatestNotifier). - Added convenience Records extensions for
ResultandResultNotifier, enabling typed use ofcombineandcombineDatamethods (seeResultTuple,ResultListenableTuple, etc). - Added extension methods on
Iterable<Result>andIterable<ResultNotifier>for getting combined statuses ( e.g.isLoading,isAllLoadingetc). - Introduced the abstract type
ResultListenableand moved some functionality fromResultNotifierthere. - Added support for transforming a regular
ValueNotifier/ValueListenableto aResultListenableusingValueListenable.toResultListenable(). - Deprecated
ResultNotifierProvider- useResourceProvider(along withwatchorResultBuilder) instead. - Made some arguments required in
ResourceProviderdefault constructor and added a second constructor (ResourceProvider.custom) for subclasses. - Made
disposemethod inResourceProvideroptional, and added default implementation that callsdispose()on the resource.
0.2.1 #
- Fixed issue with
Result.toData(and thusResultNotifier.toData) not using thedataparameter correctly.
0.2.0 #
- Updated
setResultAsyncto always return aResult, even if an error occurs. - Method
cancelinResultNotifierno longer accepts aResultas a parameter. - Updated API of CombineLatestNotifier (changed constructor and added static factory methods) and removed @expermimental annotation.
- Renamed ChainedNotifier to EffectNotifier and removed @expermimental annotation.
- Added effect methods to
ResultNotifier.
0.1.1 #
- Added lint package and fixed analysis warnings.
0.1.0 #
- Initial release, with basic ResultNotifier functionality.