Comments (4)
never changes over time
That's for the default constructor.
Provider.value
constructor properly updates dependents when the value changes.
The mean to achieve the update is different though. Instead of a Listenable
/ChangeNotifer
, you'll need a stateful widget and call setState
to update the passed value.
from provider.
All providers are reactive. ChangeNotifierProvider
is built on the top of the one in the example.
Improving the documentation and making great examples is definitely needed. But note that, as opposed to scoped_model
, there's not a single possible architecture using provider
.
provider
is a mean, not the end.
from provider.
"This is perfect for exposing a complex object that never changes over time without writing a StatefulWidget"
never change .. is where I got the 'non reactive' thought.
In Scoped_model we extend out model from the included Model class and call 'notifyListeners' to get reactivity. Which is the source of my confusion.
from provider.
Ahhh ...
"The mean to achieve the update is different though. Instead of a Listenable/ChangeNotifer, you'll need a stateful widget and call setState to update the passed value."
thanks, got it now!
from provider.
Related Issues (20)
- MaterialApp's builder function breaks provider. Home: does not HOT 5
- 可以添加一个中文文档吗? HOT 1
- Provider variable Null check operator used on a null value HOT 1
- Use `Selector` with Records instead of Tuple HOT 3
- Provider<ThemeProvider> not found for Consumer<ThemeProvider> works in debug; broken in release. HOT 8
- Create a DevTools extension for `package:provider` HOT 3
- Provider<DateTime Function()> it's a good practice ? HOT 1
- Flag to shorten error output HOT 4
- Copied comment from stackoverflow HOT 1
- Provider Extensions HOT 1
- Inherited_provider.dart class _CreateInheritedProviderState<T> throws error when I pass in 440 as double? works with 440.0 HOT 1
- Provider 6.1.0 appears to be missing devtools extension assets HOT 2
- context.read CAN be called within build method HOT 1
- Trying to solve code duplication when working with lists of Widgets in Consumer HOT 4
- The shouldUpdate Selector method returns the same previous and next values HOT 1
- Listen to Changes from a Notifier HOT 3
- DevTools failed to connect with package:provider HOT 3
- Stream issue with StreamProvider HOT 3
- Parameter createdByTestHelpers no longer used in withIgnored method HOT 1
- Mitigate ProviderNotFoundException with context redirection HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from provider.