storyboard
storyboard copied to clipboard
Dialogs show up in the StoryBoard "host" window
When an app screen in a story board show a dialog, it shows up in the story boards "host" canvas and is not constrained to the "screen" it originated from. This might or might not be a desirable feature, mostly it is probably not desired if you are presenting a mobile app UI:
This is because flutter by default looks up the root navigator. You can have it appear correctly by doing the following:
showDialog(
context: context,
useRootNavigator: false,
builder: (context) {
return AlertDialog(
title: Text('Info'),
content: Text('Dialog Test'),
);
});
![Screen Shot 2020-05-09 at 10 03 29 PM](https://user-images.githubusercontent.com/31253215/81491241-f4274d00-9240-11ea-8e01-7165d0d8ea8a.png)
That's true. I will test and verify in the app where I used StoryBoard that setting useRootNavigotor to false on all show dialog calls don't cause any other issues in the app. If it does not, then this is certainly a good enough work around.
I just tested this, changed all useRootNavigator settings to false. While it did not have any perceivable effect on the functionality of the app, it also did not solve the issue. All dialogs still show up in the host app's viewport.
This happens at least when using the StoryBoard() as an in-app feature with customLanes. It solves the issue the issues when you wrap you entire app with StoryBoard though, like shown in your example.