withInitialValue method
Create an initial value override, which can be given to an AtomScope
or
AtomRegistry.
By default it calls Atom.keepAlive
, to ensure the initial value is not
disposed.
Implementation
AtomInitialValue<T> withInitialValue(
T value, {
bool keepAlive = true,
}) {
if (keepAlive) {
_keepAlive = true;
}
return AtomInitialValue(this, value);
}