onWillSet method

T? onWillSet(
  1. ZenithNode<T> node,
  2. T currentValue,
  3. T newValue
)

Called before newValue is assigned to node.

  • Return a modified value to transform the incoming value before assignment.
  • Return newValue unchanged to allow normal write.
  • Return null to cancel/block the write operation entirely.

Implementation

T? onWillSet(ZenithNode<T> node, T currentValue, T newValue) => newValue;