async_cubits 0.6.0 copy "async_cubits: ^0.6.0" to clipboard
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 now MutationSuccess<I, T> — holds both the input passed to invoke and the result
  • Breaking: onSuccess(T result) is now onSuccess(I input, T result)
  • Breaking: MutationState factory constructors removed — use concrete classes directly (MutationIdle(), MutationLoading(), MutationSuccess(input, result), MutationFailure(error, stackTrace))

0.5.1 #

  • Added AsyncCubitContainer.performDefault<T>() static shorthand for AsyncCubitContainer.defaultInstance.perform<T>()

0.5.0 #

  • Breaking: AsyncCubitContainer.invalidate<T>() replaced by perform<T>({required runner, filter}) — accepts any BlocBase subtype and executes an arbitrary async runner on each matching cubit
  • Breaking: MutationCubit.invalidate<T>() removed — use container.perform<T>(runner: (c) => c.invalidate()) inside onSuccess instead
  • FutureCubit.invalidate gains optimisticRefresh parameter: emits an optimistic value immediately before the refresh fetch begins; no-op when reload: true

0.4.0 #

  • AsyncCubitContainer now stores cubits in a List, allowing multiple instances of the same type to be registered simultaneously
  • AsyncCubitContainer.invalidate<T>() now invalidates all registered cubits of type T (previously only one per type); accepts optional reload and filter parameters
  • Removed AsyncCubitContainer.get<T>() and invalidateAll(List<Type>) — use invalidate<T>() directly

0.3.0 #

  • Replaced freezed-based AsyncValue and MutationState with native Dart sealed classes — removes freezed_annotation and build_runner dependencies
  • Merged FutureWithArgsCubit into FutureCubit: concrete subclasses now define their own load/refresh methods calling performLoad/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

2
likes
150
points
371
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A set of cubits that can be used to handle async operations in a simple, consistent way.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, flutter_bloc, meta

More

Packages that depend on async_cubits