You can do this with the Navigator.pop()
method using the following steps:

Define the home screen

Add a button that launches the selection screen

Show the selection screen with two buttons

When a button is tapped, close the selection screen

Show a snackbar on the home screen with the selection

1. Define the home screen

The home screen displays a button. When tapped,
it launches the selection screen.

2. Add a button that launches the selection screen

Now, create the SelectionButton, which does the following:

Launches the SelectionScreen when it’s tapped.

Waits for the SelectionScreen to return a result.

3. Show the selection screen with two buttons