I am working on a flutter application using several dialogs for several purposes.
In our code, there are some cases where the user can open a Dialog. Inside this dialog, there are some buttons that will also open another dialog. It results with 2 dialogs on top of each other and with a very dark background screen.
What we would like to do is to only display one dialog at the time. How can we achieve that ?

Here is a simple code to illustrate our issue:

```dart
class MyScreen extends StatelessWidget {
  @override
  build(BuildContext context) {
    return FlatButton(
      child: Text('Button'),
      onPressed: () async {
        final resultDialog = await showDialog<ResultDialog1>(
          context: context,
          builder: (BuildContext context) => MyFirstDialog(),
        );
        // Do some stuff with the result, so this part of the tree cannot be destroyed
      },
    );
  }
}

class MyFirstDialog extends StatelessWidget {
  @override
  build(BuildContext context) {
    return FlatButton(
      child: Text('Button in first dialog'),
      onPressed: () async {
        final resultDialog = await showDialog<ResultDialog2>(
          context: context,
          builder: (BuildContext context) => MySecondDialog(),  // <- This will appear on top of the first dialog
        );
        // Do some stuff with the result, so this part of the tree cannot be destroyed
      },
    );
  }
}

class MySecondDialog extends StatelessWidget {
  @override
  build(BuildContext context) {
    return Text('Second Dialog');
  }
}

```