Expand description
The stack of modal surfaces that are open right now.
Modality is a user-interface fact — a dialog is open, everything behind it is inert — while the back gesture is a platform one. This registry is where they meet: dialogs push themselves on while they are composed, and the application shell asks the innermost one to close when the platform reports a back request. Nothing outside the framework registers or dispatches.
Structs§
- Modal
Registration - Keeps a modal surface on the stack until it is dropped.
Functions§
- clear_
modals - Clears every registration. Used by tests and by host teardown so one composition’s modals never outlive it.
- dispatch_
modal_ back - Asks the innermost modal surface to close.
- local_
modal_ depth - CompositionLocal carrying the modal depth at which content is being composed: zero outside any dialog, or the depth of the innermost dialog that encloses the current composition.
- modal_
depth - How many modal surfaces are open. Reading this in a composable subscribes to it, so the reader recomposes when a modal opens or closes.
- register_
modal - Pushes a modal surface onto the stack. The innermost registration is the one
dispatch_modal_backasks to close.