Skip to content

Question: How to Guard a Modal? #90

Description

@Hackmodford

Is it correct that guards are not run for modal flows?

Edit: I found this in the comments.

  /// Guards on the main router are **not** rerun when starting a flow
  /// (a flow is its own transient state, not a navigation on the main
  /// stack). The sub-router has no guards by default; pass [flowGuards]
  /// if you need them.

Maybe this would be worth pointing out in the docs.

Edit 2: Are guards not run for the first route in a flow? It might also be worth adding the reevaluateOn parameter to running modal flows. Also, having a way to dismiss a modal flow with a guard would be useful.

Edit 3: Now I'm confused why sometimes you can add flowGuards and sometimes it's not an option.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions