async_cubits 0.6.0
async_cubits: ^0.6.0 copied to clipboard
A set of cubits that can be used to handle async operations in a simple, consistent way.
0.6.0 #
- Breaking:
MutationSuccess<T>is nowMutationSuccess<I, T>— holds both theinputpassed toinvokeand theresult - Breaking:
onSuccess(T result)is nowonSuccess(I input, T result) - Breaking:
MutationStatefactory constructors removed — use concrete classes directly (MutationIdle(),MutationLoading(),MutationSuccess(input, result),MutationFailure(error, stackTrace))
0.5.1 #
- Added
AsyncCubitContainer.performDefault<T>()static shorthand forAsyncCubitContainer.defaultInstance.perform<T>()
0.5.0 #
- Breaking:
AsyncCubitContainer.invalidate<T>()replaced byperform<T>({required runner, filter})— accepts anyBlocBasesubtype and executes an arbitrary asyncrunneron each matching cubit - Breaking:
MutationCubit.invalidate<T>()removed — usecontainer.perform<T>(runner: (c) => c.invalidate())insideonSuccessinstead FutureCubit.invalidategainsoptimisticRefreshparameter: emits an optimistic value immediately before the refresh fetch begins; no-op whenreload: true
0.4.0 #
AsyncCubitContainernow stores cubits in aList, allowing multiple instances of the same type to be registered simultaneouslyAsyncCubitContainer.invalidate<T>()now invalidates all registered cubits of typeT(previously only one per type); accepts optionalreloadandfilterparameters- Removed
AsyncCubitContainer.get<T>()andinvalidateAll(List<Type>)— useinvalidate<T>()directly
0.3.0 #
- Replaced
freezed-basedAsyncValueandMutationStatewith native Dart sealed classes — removesfreezed_annotationandbuild_runnerdependencies - Merged
FutureWithArgsCubitintoFutureCubit: concrete subclasses now define their ownload/refreshmethods callingperformLoad/performRefresh - Removed
RefreshStreamFutureCubitMixin
0.2.0 #
Add MutationCubit used to invoke async operations by some side effect (eg. form submit)
0.1.0+3 #
Fix code formatting in README file
0.1.0+2 #
Create async_cubits package