For example, to start a location route that lets the user select
their location, you could do the following:

And then, inside your location route, once the user has selected their location
you can pop the stack with the result:

Async UI

What is the equivalent of runOnUiThread() in Flutter?

Dart has a single-threaded execution model, with support for Isolates
(a way to run Dart code on another thread), an event loop, and
asynchronous programming. Unless you spawn an Isolate, your Dart code
runs in the main UI thread and is driven by an event loop. Flutter’s event
loop is equivalent to Android’s main Looper—that is, the Looper that
is attached to the main thread.