update method
void
update(
- T fn(
- T? value
Updates the value based on the provided function.
Implementation
void update(T Function(T? value) fn) {
final T updatedValue = fn(value);
if (updatedValue != null) {
value = updatedValue;
}
}