cell<T, V extends ValueCell<T> > method
Return an instance of a ValueCell
that is kept between builds of the widget.
This function is intended to be used within build to create and
retrieve an instance of a ValueCell
, so that the same instance will be
returned across calls to build.
During the first build of the widget every call to cell will result in a
new ValueCell
instance being created by calling the provided create
function. In subsequent builds, cell returns the existing
ValueCell
instance that was created during the first build using
create
.
NOTE: This method may only be called within the build method.
Implementation
V cell<T, V extends ValueCell<T>>(CreateCell<V> create) {
assert(_activeCellElement != null);
return _activeCellElement!.getCell(create);
}