bound_mutation 2.3.0
bound_mutation: ^2.3.0 copied to clipboard
A small wrapper class around Riverpod Mutations to bind a function to a mutation.
2.3.0 #
- Adds key support to
BoundMutationandBoundAction, mirroring riverpod'sMutation.call:deleteUser(id)returns an instance with the same callback but a state of its own, sorun,resetand watching are scoped to that key - Adds
key, which exposes the key an instance is scoped to (nullwhen unkeyed) - Documents keys in the README and the example
2.2.0 #
- Adds
cascadetoBoundMutationandBoundAction— runs the bound callback inside an existingMutationTransaction, leaving the mutation's own state untouched - Documents the public API
- Adds a runnable pure Dart example in
example/main.dart - Breaking: the
cbfield is now private (_cb). Userunto execute the mutation orcascadeto reuse its callback inside another mutation
2.1.0 #
- Adds
BoundAction<ResultT>— a mutation without input BoundMutation<ResultT, InputR>keeps its required input; both share the sameProviderListenable<MutationState<ResultT>>integration
2.0.0 #
- migrate to
CustomProviderListenable/SyncProviderTransformer2, replacing theSyncProviderTransformerMixin,ProviderTransformerandProviderTransformerContextAPIs deprecated in riverpod 3.4.0 - Breaking: requires riverpod
^3.4.0(was^3.0.0) - Breaking: requires Dart SDK
^3.12.0(was^3.8.0), as mandated by riverpod 3.4.0
BoundMutation still implements ProviderListenable<MutationState<ResultT>>, so
ref.watch, container.listen, run and reset are unchanged.
1.0.3 #
- remove flutter dependency
1.0.2 #
- switch to riverpod from flutter_riverpod
1.0.1 #
- relax dependencies
1.0.0 #
- Inital release
- Adds BoundMutation