Skip to content

Add navigate back with result for UI entries #8

@kikin81

Description

@kikin81

Goal

Allow a screen to go back and return a typed result to the previous screen. Support this for UiEntry and UIExternalEntry so callers can launch an entry, await a result, and handle it in a safe way.

Scope

  • Design a simple API to request an entry and await a result
  • Implement result passing for UiEntry
    • Store the pending request and deliver the result on back navigation
    • Ensure single delivery, even across configuration changes
  • Implement result passing for UIExternalEntry
    • Bridge external flows so they can return a result when finishing
  • Handle edge cases
    • Previous screen destroyed and recreated
    • Multiple outstanding requests
    • Type safety and key collisions
  • Add sample usage in sample app
    • One screen launches another, gets a result, updates UI
  • Docs
    • KDoc on public API
    • README section with short examples

Outcome

  • Callers can open a UiEntry or UIExternalEntry and receive a typed result when the user goes back
  • Results are delivered once, survive rotation, and handle cancel paths
  • Demo and tests prove the flow
  • Documentation explains how to adopt it

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions