pipActionScope method

EngageActionScope pipActionScope(
  1. BuildContext context
)

Action bindings for buttons inside the expanded PiP content.

Overrides dismiss for two reasons at once. DigiaHost mounts the PiP above the app's Navigator, so there is no route to pop — the default Navigator.of lookup would throw before any action could run. And even if it could pop, popping isn't the right end state here: taking an action from the expanded content is the end of this showing, so it should end the campaign, not leave the teaser floating for the user to dismiss a second time.

Implementation

EngageActionScope pipActionScope(BuildContext context) =>
    EngageActionScope.fromContext(
      context,
      dismiss: () => _pipOrchestrator.dismiss(PipDismissReason.ctaTaken),
    );