Download Latest Version 2.2.0 source code.tar.gz (330.5 kB)
Email in envelope

Get an email when there's a new version of Compose Destinations

Home / 2.2.0
Name Modified Size InfoDownloads / Week
Parent folder
2.2.0 source code.tar.gz 2025-05-03 330.5 kB
2.2.0 source code.zip 2025-05-03 620.5 kB
README.md 2025-05-03 1.7 kB
Totals: 3 Items   952.6 kB 0

What changed

  • Fixes issues related to KSP v2
  • Fixes [#736]
  • Fixes [#728]
  • Fixes [#714]
  • Fixes [#719]
  • Improve error messages and docs
  • Dependency updates

Optional result back in ON_RESUME / ON_START [#719]

By default, compose destinations will call onNavResult in first opportunity between "onResume" and "onStart". That is because in some situations, I've found that "onResume" is actually not called. However, that makes it be called mostly in "onStart", and in some other cases it may not be ideal (see [#719]).

So, we've introduced a new onNavResult overload that takes a parameter developers can use to choose when they want to receive the result. Example:

:::kotlin

@Destination<RootGraph>
@Composable
fun MyScreen(
    resultRecipient: ResultRecipient<ConfirmationScreenDestination, Boolean>
) {

    resultRecipient.onNavResult(
        deliverResultOn = OpenResultRecipient.DeliverResultOn.RESUME
    ) { result ->
        // ...
    }
}

By default, if you call the overload which does not take any param here, it will use FIRST_OPPORTUNITY to not make a breaking change in behaviour here.

New Destination label (#714)

Destination annotation now has a new param "label". This is used to set what official navigation library supports in NavDestination.label. Can be useful for monitoring, logging, etc.

:::kotlin
@Destination<RootGraph>(
    label = "my screen label"
)
@Composable
fun MyScreen() {
}

Full Changelog: https://github.com/raamcosta/compose-destinations/compare/2.1.1...2.2.0

Source: README.md, updated 2025-05-03