To learn more, check out Navigation and routing.

Manually pop back

In SwiftUI, you use the dismiss environment value to pop-back to
the previous screen.

Button

"Pop back"

dismiss

()

In Flutter, use the pop() function of the Navigator class:

Test in DartPad

View on GitHub

Navigating to another app

In SwiftUI, you use the openURL environment variable to open a
URL to another application.

@Environment

(\

openURL

private

var

openUrl

// View code goes here

Button

"Open website"

openUrl

URL

string

"https://google.com"