Skip to content

Modular.setInitialRoute is not working #1028

@GabrielGoliveira04

Description

@GabrielGoliveira04

Describe the bug
This method never works because, when called, it sets the value in a variable that isn't used by Modular.initialRoute, as you can see in the following images:

Image

I could access the correct value by calling Modular.initialRoutePath. But it generates a warning because this information is annotated with @VisibleForTesting. However, the method would still continue with no effect.

Image

And for this method to really work, it is necessary to fix this code too.

Image

initialRouteInformation: RouteInformation(uri: Uri.parse(initialRoute))

Environment
Image

Image

To Reproduce
Just try to set a new initial route and get initialRoute after. Will always be "/" and will have no effect.

Expected behavior
If I change the initialRoute, I expect to get the new one

Metadata

Metadata

Assignees

No one assigned

    Labels

    newNew issue request attention

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions