provider_kit 0.3.0
provider_kit: ^0.3.0 copied to clipboard
A toolkit for the Provider package with reusable state management components, builders, listeners, mutations, caching, and observers to reduce boilerplate.
0.3.0 #
Mutations
- Added
Mutationfor managing the state of asynchronous operations. - Added
MutationGroupfor managing independent mutations by key. - Added automatic disposal for keyed mutations in
MutationGroup. - Added configurable
KeepAliveStatesupport for preserving completed mutation states. - Added
MutationStatepattern-matching helpers:when,maybeWhen,map, andmaybeMap. - Added convenience state getters:
isIdle,isLoading,isSuccess, andisError. - Added access to successful mutation results through
Mutation.data.
State Widgets and ViewState Widgets
-
Added
.ofconstructors to:StateBuilderStateListenerStateConsumerViewStateBuilderViewStateListenerViewStateConsumer
.ofresolves the provider from the widget tree usingPandTgenerics.StateBuilder.of<MyProvider, MyState>(builder: ...) -
Breaking:
-
Renamed
shouldCallListenerOnInittocallListenerOnInit. -
All
State WidgetsandViewState Widgetsnow use one generic (T) instead of two. -
The
providerparameter is now required in the main constructor.Before:
StateBuilder<MyProvider, MyState>( provider: myProvider, ... )After:
StateBuilder<MyState>( provider: myProvider, ... ) -
Context-based lookup is now available through
.of.Before:
StateBuilder<MyProvider, MyState>(builder: ...)After:
StateBuilder.of<MyProvider, MyState>(builder: ...) -
Removed the
NotifierBuilder,NotifierListener, andNotifierConsumeraliases introduced in0.1.0.- Use
StateBuilder,StateListener, andStateConsumerinstead.
- Use
-
Testing
- Added test coverage for
Mutation. - Updated existing test cases for state and widget functionality.
Documentation
- Updated documentation and examples for the latest API changes.
- Published the new ProviderKit Snippets VS Code extension for common ProviderKit templates.
0.2.0 #
- Breaking: Renamed
ProviderKittoAsyncViewStateNotifier. - Replaced
StateNotifierwithStateValueListenableas the shared abstraction for ProviderKit state widgets. - Generalized all state and multi-state widgets to support any
StateValueListenable. - Fixed an issue where
AsyncViewStateNotifiercould continue updating state after being disposed. - Added
mountedto all notifiers to safely guard asynchronous operations against disposal. - Updated testcases
- Improved documentation and README with clearer explanations and usage examples.
0.1.0 #
-
Added
NotifierBuilder,NotifierListener, andNotifierConsumeraliases to eliminate verbose<StateNotifier<T>, T>generics onState Widgetswhen passing aStateNotifierdirectly.// Before StateBuilder<StateNotifier<int>, int>(provider: notifier, ...) // After NotifierBuilder<int>(provider: notifier, ...)
0.0.2 #
- Added comprehensive test suite with over 340 test cases.
- Fixed core bugs in base widgets.
- Added override feature to
ViewStateWidgetProvider. - Improved and expanded package documentation.
0.0.1 #
- Initial release of
provider_kit. - A complementary toolkit designed to augment the
providerpackage with advanced state management utilities. - Introduces a flexible state container and a suite of reactive widgets to consume state updates seamlessly.
- Provides built-in utilities for handling loading, error, and data states with minimal boilerplate.
- Includes optional mixins for state caching and lifecycle observation.
For a full list of available widgets and classes, please refer to the package documentation.