noteBlocked method

  1. @protected
void noteBlocked(
  1. AdBlockReason reason
)

Records a refusal and notifies AdFlow.onAdBlocked.

The app callback is ISOLATED: it fires from inside load/show transitions, so a throw from it used to corrupt the very transition that reported the refusal (4.0 audit).

Implementation

@protected
void noteBlocked(AdBlockReason reason) {
  _lastBlockReason = reason;
  final onBlocked = _onBlocked;
  if (onBlocked != null) {
    guardedCallback(() => onBlocked(slot, reason), debugName: 'onAdBlocked');
  }
}