register method

void register(
  1. String anchorId,
  2. void onTap()
)

Registers onTap under anchorId (bare id or zfa: key — normalized). Re-registering replaces the handler (idempotent remounts must not stack callbacks).

Implementation

void register(String anchorId, void Function() onTap) {
  _handlers[ZfaAnchors.normalize(anchorId)] = onTap;
}