provide_it 0.19.2
provide_it: ^0.19.2 copied to clipboard
Provider-like state binding, management, and injection using only context extensions.
Changelog #
0.19.2 #
- Improved error handling for missing parameters in
Injector.
0.19.1 #
- Now returns
nullwhenInjector.locatorthrows, debug prints error.
0.19.0 #
- Added
ProvideIt.restartto restart app subtree and it's bind dependencies. - Added
ProvideIt.override&context.override. - Now handles
ProvideIt.provideerrors inProvideIt.errorBuilder. - Removes
Reftop level binding to focus solely onTypebindings. - Fixed
Ref.didUpdateRefto callbackoldRefcorrectly. - Improved exceptions.
0.18.7 #
- Further improvements to
AsyncBind.
0.18.6 #
- Fixed
AsyncBindto prevent notifying during build.
0.18.5 #
- Fixed
Stream.emptythrowingTypeErrorinstead of settingAsyncSnapshot.error.
0.18.4 #
- Fixed
Watcherresolution order.
0.18.3 #
- Fixed
Bindreplacement order whenRef.keychanges.
0.18.2 #
- Added
Bind.deactivatedto check if a bind called deactivate. - Now duplicate binds asserts checks only non-deactivated binds.
0.18.1 #
- Fixed error when reading minified types in web release mode.
0.18.0 #
RefStateis now simplyBind.- Fixed
InjectorthrowingArgumentErrorin web release mode.
0.17.1 #
AsyncRefnow resolves early stream/future creation errors.
0.17.0 #
- Removed
ReadItMixin. UseReadItonly. - Removed
ReadIt.bind. UseRef.bindonly. - Removed
ReadIt.I&get_itdeprecations. - Improved
RefWidget.disposeto callback an inactive context instead of an unmounted. - Improved setup errors/asserts.
- Added tests.
0.16.1 #
- Fixed
Injector.isAsyncto resolve abstractions correctly. - Changed
InjectorErrorto throw exclusively onParaminjection errors. - Fixed missing
listen<T>type. - Updated example.
- Added tests.
0.16.0 #
- Added
Injector.returnType. - Injector now throws
InjectorError. - Improved
context.provideinjection asserts. - Improved
provideto ignore notifications before first read. - Updated example.
0.15.0 #
Injector.parametersis now simplyMap<String, dynamic>.- Added assertion to prevent async marked
ProvideIt.provide. - Added
ReadIt.mounted. - Fix
ProvideItto correctly disposes on test. - Fix duplicate scopes when using nested
ProvideIt. - Updated
README.md. - Added tests.
0.14.0 #
- Now
Injectoris fully scoped. - Replaced
ProvideIt.namedLocatorforProvideIt.locator. - Added
ProvideIt.parameters. - Improved
Injector.parametersto locate byString(named),int(positional) orType(either). - Improved
ReadIt.reloadassertions. - Updated
README.md.
0.13.0 #
- Removed
provideLazy. Useprovide(lazy: true). - Removed
provideFactory. Useprovidein context scopes. - Removed
shouldNotifySelf. Usewatchexplicitly. - Removed
RefState.bind. UseReadIt.bindnew signature. - Moved
RefState.createtoAsyncRefState.create. - Moved
BuildContext.vsynctoCreateContext.vsync. - Updated
CreateRef.createto useCreateContextextension type. - Added
ProvideRef.lazyPredicatefallback behavior whenlazy=null. Defaults tolazy=true, unless the provider is async. - Added
ValueListenableProvidermigration. - Improved hot-reload experience when removing single binds.
- Updated
README.md.
Thanks to almeidajuan.
0.12.0 #
- Removed
RefState.tryDispose. - Renamed
context.findRefStateOfTypetocontext.getRefStateOfType(as it's O(1)). - Renamed
notifyDependentstonotifyObservers(reflectsWatcherapi). - Limited
writetoValueRef.write. - Improved
Injectortype resolution. - Added
ValueRef.debounce. - Added
ValueRef.throttle.
0.11.0 #
- Improved
Watcherapi & docs. - Improved hot-reload experience when changing binds.
- Updated
README.md.
0.10.0 #
- Added
context.write(T). - Added support to use
Refas top-level member. - Improved
RefState, now overridesT? value. - Improved
RefState.dispose(T)to not be called when a lazy was not yet used. - Improved errors/asserts.
0.9.0 #
- Improved
AsyncRefState.loadto unsubscribe old futures/streams. - Removed the need for
BuildContextinRefState.bind. Simply useRef.context, instead. - Now it's possible to read using T?, if not found, returns null instead of throwing.
- Exposed
RefState.dependentsapi. - Exposed
BuildContext.findRefStateOfTypeapi. - Improved asserts.
- Added tests.
0.8.2 #
- Improved [RefState.removeDependent]. Now O(1).
- Added internal [BuildContext.dependOnRefState].
0.8.1 #
- Removed unnecessary
readdependency onProvideIt. - Improved context dependency asserts.
0.8.0 #
- Changed [Injector.parameters] to use [Symbol] instead of [String].
- Improved [ReadIt] type resolution.
- Improved [Injector.toString]
- Improved [Param.toString].
- Improved async injections.
- Updated example.
- Updated
README.md. - Bump min constraints to Dart 3.3.0 / Flutter 3.19.0.
0.7.0 #
- Improved lookup: O(1) for uniques binds, and O(n) for duplicates.
- Removed the need for
BuildContextinRefState.read. - Added
ReadItfor dependency injection outside of widgets. - Added
GetItmigrations. - Added
Benchmarkexample. - Added unit-tests & widget-tests.
0.6.0 #
- Added
context.init. - Added
context.dispose. - Added
AsyncRef.allReady. - Added
AsyncRef.allReadySync. - Added
AsyncRef.isReady. - Added
AsyncRef.isReadySync.
0.5.0 #
- Added
MultiProvidermigration. - Added
Consumermigration. - Added
ChangeNotifierProvidermigration. - Added
ListenableProvidermigration. - Added
ChangeNotifierWatcher. - Improved abstractions injection.
- Updated
README.md.
0.4.0 #
- Added
AsyncRefState.ready(). - Added
context.readAsync(). - Added
AsyncSnapshotExtension: when/maybeWhen & getters. - Added
Param.isFuture. - Improved
FutureRefto resolve immediately. - Improved
Injector.callto handle futures. - Improved
ProvideIt.provideinitialization.
0.3.0 #
- Added
AsyncRef&context.reload(). - Added
errorBuildertoProvideIt. - Added
loadingBuildertoProvideIt. - Added
context.provideFactory(). - Added
context.provideValue(). - Added
FutureRef&context.future(). - Added
StreamRef&context.stream(). - Added
ProvideIt.allowedDuplicatesfor duplicate rules. - Added
Watcher.canUpdate. - Improved
Injectorfor efficient parsing. - Improved
ContextReadersfor efficient lookup.
0.2.0 #
- Changed
ProvideIt.roottoProvideIt. - Added
provide_it/injector.dartlibrary. - Added
Injector&Paramfor auto-injection. - Improved all
providemethods with auto-injection. - Added
ProvideLazyRef&context.provideLazy. - Added
Watcherfor custom watching. - Added
ProvideIt.watcherswithDefaultWatchers. - Added
ProvideIt.namedLocator. for injecting parameters. - Added
CreateRef&context.create.
0.1.0 #
- Changed
ProvidertoProvideIt.root. - Improved ref dispose/removal on hot-reload.
- Improved several
toStringfor debugging. - Added several
assertsfor debugging. - Added
readItlocator. - Added
Ref.debugValuefor debugging. - Added
ProvideIt.logfor debugging. - Added
RefState.removeDependent. - Added
dependOnInheritedElementfor bind accessors. - Removed the need for
RefState._garbageCollector.
0.0.1 #
- Initial release.