DEV Community

Cover image for Return a Result From a Route
YeLinAung for dust

Posted on Originally published at dust-codegen.pages.dev

Return a Result From a Route

Dust Routing code snapshot showing a support screen returning a boolean result to its caller

Open a screen and wait for one result.

The support route declares result: bool.

Its generated push() returns Future<bool?>.

The support screen tracks whether a message was sent.

The back action returns that value with context.navigator.pop.

The caller shows confirmation only when the result is true.

Docs used: typed route results and the shopping app support flow.

Dust #Routing #Flutter #Dart

Top comments (0)