update<U> method
U
update<U>(})
inherited
Call within the updateState
method to determine the rebuild
of the widget according to the state change.
Implementation
U update<U>(
U oldValue,
U newValue, {
bool Function(U a, U b)? compare,
bool? ignoreChange = false,
}) {
if (oldValue == null) {
_changed = true;
} else if (ignoreChange == false && _changed == false) {
_changed = compare == null
? oldValue != newValue
: compare(oldValue, newValue) == false;
}
return newValue;
}