Skip to content

how to open a module located in RouterOutlet from another RouterOutlet module by the link #211

@skiryuk

Description

@skiryuk

Hello, thanks for a good solution for flutter application architecture.

Our project has a non-standard case, we need to open another module from one module located in CupertinoTabBar,
because I have a couple of questions:

  1. I have a main module (MainTabsModule) with tabs, other modules (MenuTabModule, NotificationsTabModule, SettingsTabModule) are loaded in it via RouterOutlet. I require from MenuTabModule (more precisely its start page MenuTabPage), open for example SettingsTabModule (not the start page, but another one beforehand somehow passing it).

I made it so that the RouterOutlet will rebuild depending on changes in the controller. In the controller, changes will occur when parameters are received when switching to the MainTabsModule (see picture)

image

the navigate to the module is carried out as follows

image

module references are
image

image

Is it possible to do this? Or is there an easier way?

  1. When approaching step 1, there is one unpleasant problem. When you swipe to the right, the root page opens, which is not needed, we need to go back MenuTabModule. How to solve this problem?

image

image

One of the solutions to this problem is not to use the starting slash in the route name. But these route names do not work with flutter_modular (when using such names of routes, it simply redirects to the start page of the module)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions