update method

void update(
  1. T updateValue(
    1. T oldValue
    ), {
  2. bool notifyImmediately = true,
})

Updates the current value of the Pod via updateValue and calls notifyListeners if the returned value is different from the current value.

Implementation

void update(
  T Function(T oldValue) updateValue, {
  bool notifyImmediately = true,
}) {
  final newValue = updateValue(value);
  _set(newValue, notifyImmediately: notifyImmediately);
}