Skip to content
This repository was archived by the owner on Jun 25, 2019. It is now read-only.
This repository was archived by the owner on Jun 25, 2019. It is now read-only.

Navigator.push() a new Route right after dismissing the mapView, is not centered in the screen #37

Open

Description

@gcastanheiro

The app flow I am trying to implement is the following:

  1. I have a First Screen, which calls mapView.show().
  2. When I call click the button to call mapView.dismiss(), I want the First Screen to launch the Second Screen.
  3. The map activity is dismissed, and the Second Screen is actually shown, but not in the center of the screen, as seen below.

image

Do you have any idea on what's causing this? I'm assuming that somehow this is related to the plugin because when I create the same flow using only Flutter's Route, this doesn't happen.
Thanks in advance!

Activity

  1. gcastanheiro commented on Apr 16, 2018

    @gcastanheiro
    Author

    Update:

    I found a work around. Instead of calling the push of a new Route right after mapView.dismiss(), I added a delay between them, and the new Route fits to the smartphone's screen.

    `
    await mapView.dismiss();

    await new Future.delayed(const Duration(seconds: 1));

    Navigator.push(_context, new MaterialPageRoute(builder: (context) => new SecondScreen()));
    `

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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