-
-
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
Showing
2 changed files
with
171 additions
and
6 deletions.
There are no files selected for viewing
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
16 changes: 16 additions & 0 deletions
16
navigation-core/src/commonMain/kotlin/com.chrynan.navigation/NavigationContext.kt
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,16 @@ | ||
package com.chrynan.navigation | ||
|
||
/** | ||
* Represents a navigation context, or a container of a back stack of [Key]s. Navigation can take place within a | ||
* [NavigationContext] typically by changing [Key] values. But an application may have multiple [NavigationContext]s | ||
* that can be changed and navigated through. This allows for more complex navigation paradigms, such as retaining | ||
* multiple back stacks for a bottom navigation UI component. | ||
*/ | ||
interface NavigationContext<Key> { | ||
|
||
/** | ||
* The initial key value that should be displayed when first changing to this [NavigationContext] before any other | ||
* navigation was performed. | ||
*/ | ||
val initialKey: Key | ||
} |