data<T> method
Keeps track of some data that can be stateful. You may set the value of returned ValueWrapper both:
- Outside of the build, like a normal call to
setState
- Inside of the build, to use its value inside build
This is a more powerful alternative to state.
Implementation
ValueWrapper<T> data<T>(T initial) => use.lazyData(() => initial);