-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Chris
committed
May 23, 2023
1 parent
5a3b171
commit f50dd04
Showing
81 changed files
with
1,253 additions
and
217 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
...pose/navigation-compose/com.chrynan.navigation.compose/-navigation-container.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
//[navigation-compose](../../index.md)/[com.chrynan.navigation.compose](index.md)/[NavigationContainer](-navigation-container.md) | ||
|
||
# NavigationContainer | ||
|
||
[common]\ | ||
|
||
@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html) | ||
|
||
@[ExperimentalNavigationApi](../../../navigation-core/navigation-core/com.chrynan.navigation/-experimental-navigation-api/index.md) | ||
|
||
fun <[Destination](-navigation-container.md) : [NavigationDestination](../../../navigation-core/com.chrynan.navigation/-navigation-destination/index.md), [Context](-navigation-container.md) : [NavigationContext](../../../navigation-core/navigation-core/com.chrynan.navigation/-navigation-context/index.md)<[Destination](-navigation-container.md)>> [NavigationContainer](-navigation-container.md)(navigator: [Navigator](../../../navigation-core/navigation-core/com.chrynan.navigation/-navigator/index.md)<[Destination](-navigation-container.md), [Context](-navigation-container.md)>, modifier: [Modifier](https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.html) = Modifier, content: @[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html)[BoxScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/BoxScope.html).(context: [Context](-navigation-container.md), destination: [Destination](-navigation-container.md)) -> [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)) | ||
|
||
A [Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html) that listens to navigation context and destination changes from the provided [navigator](-navigation-container.md) and calls the provided [content](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html) function with the latest values. | ||
|
||
Example usage: | ||
|
||
```kotlin | ||
NavContainer( | ||
navigator = navigator, | ||
modifier = modifier | ||
) { context, destination -> | ||
Text("context = $context; destination = $destination") | ||
} | ||
``` | ||
|
||
[common]\ | ||
|
||
@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html) | ||
|
||
@[ExperimentalNavigationApi](../../../navigation-core/navigation-core/com.chrynan.navigation/-experimental-navigation-api/index.md) | ||
|
||
fun <[Destination](-navigation-container.md) : [NavigationDestination](../../../navigation-core/com.chrynan.navigation/-navigation-destination/index.md)> [NavigationContainer](-navigation-container.md)(navigator: [Navigator](../../../navigation-core/navigation-core/com.chrynan.navigation/-navigator/index.md)<[Destination](-navigation-container.md), [SingleNavigationContext](../../../navigation-core/navigation-core/com.chrynan.navigation/-single-navigation-context/index.md)<[Destination](-navigation-container.md)>>, modifier: [Modifier](https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.html) = Modifier, content: @[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html)[BoxScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/BoxScope.html).(destination: [Destination](-navigation-container.md)) -> [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)) | ||
|
||
A [Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html) that listens to navigation destination changes for a [SingleNavigationContext](../../../navigation-core/navigation-core/com.chrynan.navigation/-single-navigation-context/index.md) from the provided [navigator](-navigation-container.md) and calls the provided [content](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html) function with the latest values. | ||
|
||
Example usage: | ||
|
||
```kotlin | ||
NavContainer( | ||
navigator = navigator, | ||
modifier = modifier | ||
) { context, destination -> | ||
Text("context = $context; destination = $destination") | ||
} | ||
``` |
11 changes: 11 additions & 0 deletions
11
...n-compose/navigation-compose/com.chrynan.navigation.compose/collect-as-state.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//[navigation-compose](../../index.md)/[com.chrynan.navigation.compose](index.md)/[collectAsState](collect-as-state.md) | ||
|
||
# collectAsState | ||
|
||
[common]\ | ||
|
||
@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html) | ||
|
||
fun <[T](collect-as-state.md)> [NavigationState](../../../navigation-core/navigation-core/com.chrynan.navigation/-navigation-state/index.md)<[T](collect-as-state.md)>.[collectAsState](collect-as-state.md)(): [State](https://developer.android.com/reference/kotlin/androidx/compose/runtime/State.html)<[T](collect-as-state.md)> | ||
|
||
Converts the [NavigationState.changes](../../../navigation-core/navigation-core/com.chrynan.navigation/-navigation-state/changes.md) of this [NavigationState](../../../navigation-core/navigation-core/com.chrynan.navigation/-navigation-state/index.md) to a Jetpack Compose [State](https://developer.android.com/reference/kotlin/androidx/compose/runtime/State.html) so that every change causes a recomposition of the calling [Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html) function. |
18 changes: 4 additions & 14 deletions
18
docs/navigation-compose/navigation-compose/com.chrynan.navigation.compose/index.md
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.