Mastersam07 / Mastersam07/kaisel
Question: How to Guard a Modal?
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 69
- Forks
- 2
- Avg merge
- 18m
- Merged PRs (30d)
- 9
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the existing routing documentation and the modal-flow API entry points for guards, flowGuards, and reevaluateOn. Clarify when main-router and flow guards run, whether the first route is covered, and what options exist for guarded dismissal; done means the documented behavior and available parameters are unambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100