data<T> method

ValueWrapper<T> data<T>(
  1. T initial
)

Keeps track of some data that can be stateful. You may set the value of returned ValueWrapper both:

  1. Outside of the build, like a normal call to setState
  2. 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);