block method

  1. @override
void block (
  1. dynamic prompt
)
override

Enable blocking mode with the given prompt

In blocking mode, a Confirmation will be called before proceeding with the transition. This prevents listeners of History transitions from being notified until the Confirmation is handled.

prompt must be a String or Prompt. Use a String to use the same prompt message for all transitions. This is useful when the same message can be applied to all transitions. Use a Prompt when you want to either enable a prompt conditionally and/or pass different prompt messages based on the transition.

If blocking mode is already enabled, this method will update the prompt that is used.

Implementation

@override
void block(dynamic prompt) => _transitionManager.prompt = prompt;