Dialogs

The Router doesn't have a special method like router.routerDialog(...) to navigate to a Dialog, as this would break the project's philosophy. The caller shouldn't know what it is calling; it only navigates by Path. Therefore, your Dialog screen should implement the ViewDialog interface to inform the Router that this screen is a Dialog. This means that only the Screen knows that it is a Dialog and knows how to present itself.

In practice, you don't need to implement the ViewDialog interface yourself. You can use predefined classes available in the Fragment bootstrap package and Compose bootstrap package.

Implementation

You can read more about implementing Dialogs in the Fragment and Compose sections.

Additionally, since Dialogs usually send results, refer to the ResultApi section for more information.

Last updated