Set up universal links for iOS

Send data to a new screen

Return data from a screen

Cookbook

Navigation

Return data from a screen

1. Define the home screen

2. Add a button that launches the selection screen

3. Show the selection screen with two buttons

4. When a button is tapped, close the selection screen

Yep button
Nope button

5. Show a snackbar on the home screen with the selection

Interactive example

In some cases, you might want to return data from a new screen.
For example, say you push a new screen that presents two options to a user.
When the user taps an option, you want to inform the first screen
of the user’s selection so that it can act on that information.

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