You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 25, 2019. It is now read-only.
Repository navigation
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
The app flow I am trying to implement is the following:
I have a First Screen, which calls mapView.show().
When I call click the button to call mapView.dismiss(), I want the First Screen to launch the Second Screen.
The map activity is dismissed, and the Second Screen is actually shown, but not in the center of the screen, as seen below.
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!
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()));
`
Activity
gcastanheiro commentedon Apr 16, 2018
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()));
`