Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
doctor-blue committed Oct 2, 2021
1 parent cf55ced commit ee40699
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,26 @@ class MainActivity : AppCompatActivity() {
}
}
```
### Step 4: Navigate to other screen
- Example 1: just open Screen1
```kotlin
navController.navigate(Screen.Screen1.route)
```
- Example 2: pass random number to Screen2
```kotlin
navController.navigate(
Screen.Screen2.setParam(
Screen2Argument(
Random.nextInt(
0,
50
)
)
)
)
```


### Note
- You can get Argument object from arguments (Instance of Bundle) like example above. Or get data from SavedStateHandle like this

Expand Down

0 comments on commit ee40699

Please sign in to comment.