provider 2.0.1 provider: ^2.0.1 copied to clipboard
An helper to easily exposes a value using InheritedWidget without having to write one.
2.0.1 #
- fix a bug where
ListenableProvider.value
/ChangeNotifierProvider.value
/StreamProvider.value
/ValueListenableProvider.value
subscribed/unsubscribed to their respective object too often - fix a bug where
ListenableProvider.value
/ChangeNotifierProvider.value
may rebuild too often or skip some.
2.0.0 #
Consumer
now takes an optionalchild
argument for optimization purposes.- merged
Provider
andStatefulProvider
- added a "builder" constructor to
ValueListenableProvider
- normalized providers constructors such that the default constructor is a "builder", and offer a
value
named constructor.
1.6.1 #
Provider.of<T>
now crashes with aProviderNotFoundException
when noProvider<T>
are found in the ancestors of the context used.
1.6.0 #
- new:
ChangeNotifierProvider
, similar to scoped_model that exposesChangeNotifer
subclass and rebuilds dependents only whennotifyListeners
is called. - new:
ValueListenableProvider
, a provider that rebuilds whenever the value passed to aValueNotifier
change.
1.5.0 #
- new: Add
Consumer
with up to 6 parameters. - new:
MultiProvider
, a provider that makes a tree of provider more readable - new:
StreamProvider
, a stream that exposes to its descendants the current value of aStream
.
1.4.0 #
- Reintroduced
StatefulProvider
with a modified prototype. The second argument ofvalueBuilder
anddidChangeDependencies
have been removed. AndvalueBuilder
is now called only once for the whole life-cycle ofStatefulProvider
.
1.3.0 #
- Added
Consumer
, useful when we need to both expose and consume a value simultaneously.
1.2.0 #
- Added:
HookProvider
, aProvider
that creates its value from aHook
. - Deprecated
StatefulProvider
. Either make aStatefulWidget
or useHookProvider
. - Integrated the widget inspector, so that
Provider
widget shows the current value.
1.1.1 #
- add
didChangeDependencies
callback to allow updating the value based on anInheritedWidget
- add
updateShouldNotify
method to bothProvider
andStatefulProvider
1.1.0 #
onDispose
has been added toStatefulProvider
BuildContext
is now passed tovalueBuilder
callback