🌈 Type-safe navigation library for Jetpack Compose
This release contains the next changes:
allowEmptyBackstack
parameter. This way NavBackHandler can be used with BottomSheetNavHost now (just set allowEmptyBackstack = true
).Fixed several similar issues related to BottomSheet not being hidden properly due to any kind of user interaction with the sheet.
Support for pre-release versions of Compose 1.5.0
This release contains the next changes:
modifier
and contentAlignment
parameters nowtransitionQueueing
parameter.enabled
parameter is added to NavBackHandlerreimagined-material3
module with Material 3 dependencies onlyBreaking changes:
BottomSheetNavHost doesn't use Surface internally anymore. You need to define Surface inside BottomSheetNavHost manually:
BottomSheetNavHost(/* ... */) { destination ->
Surface(
elevation = ModalBottomSheetDefaults.Elevation
) {
when (destination) {
/* ... */
}
}
}
This however allows better customization of bottom sheet surfaces for each destination.
NavHost now uses Box
inside, so if you had previously put your NavHost inside a Box with propagateMinConstraints = true
, e.g.:
Box(propagateMinConstraints = true) {
NavHost(/* ... */) { destination ->
when (destination) {
/* ... */
}
}
}
then you might consider moving this Box inside NavHost in order to get the same propagateMinConstraints
effect:
NavHost(/* ... */) { destination ->
Box(propagateMinConstraints = true) {
when (destination) {
/* ... */
}
}
}
This release introduces new API:
NavHostState
is public now. It is possible to create it manually and set it into NavHost.NavHostVisibility
/NavHostAnimatedVisibility
The detailed description of both items is covered in this section of the documentation site.
This release contains the next changes:
BottomSheetNavHost
is available now in a separate reimagined-material
artifactBaseNavHost
composable for implementing custom NavHostsBreaking changes:
setNewBackstackEntries
method is finally hidden. Use setNewBackstack
instead.Deprecations:
AnimatedNavHostTransitionSpec
is renamed to shorter NavTransitionSpec
. The previous name is deprecated and type-aliased to the new name.This release contains the next changes:
Breaking changes:
navController
is renamed to controller
for consistency with other methodsDeprecations:
onBackstackChange
is deprecated. It is easily misused and error-prone. Use recommended Compose methods for listening and reacting to snapshot changes of backstack
, e.g. snapshotFlow
, derivedStateOf
, etc.navController
delegate for SavedStateHandle is deprecated in favor of the official saveable
delegateThis minor release contains the following changes:
reimagined-hilt
that contains a long awaited hiltViewModel()
method compatible with this library. In order to use it add the dependency:implementation("dev.olshevski.navigation:reimagined-hilt:1.1.1")
This release contains the following changes:
setNewBackstackEntries
is renamed to setNewBackstack
. The old method is deprecated, but still works.Breaking changes:
backstack
property of NavController is backed up by MutableState and will notify compose of new instances of NavBackstack.Finalized release 1.0.0
This release contains the following changes:
navController
delegate for SavedStateHandle for easy NavController creation and restorationBreaking changes:
upToPredicate
parameter to predicate
for popUpTo
and replaceUpTo
methods