updateNode abstract method

  1. @protected
bool updateNode()

Updates the node and reports whether its value changed.

This method is called by updateCustom when the reactive system needs to update this node. Implementations should:

  • Update any internal state or cached values
  • Return true if the node's value has changed (subscribers will be notified)
  • Return false if the value is unchanged (no notifications will be sent)

The return value determines whether subscribers are notified of changes. If true is returned, the reactive system will propagate updates to all subscribers of this node.

Returns: true if the value changed, false otherwise

Example:

@override
bool updateNode() {
  final oldValue = _cachedValue;
  _cachedValue = _computeNewValue();
  return oldValue != _cachedValue;
}

Implementation

@protected
bool updateNode();