We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d72e9b commit 7685cc6Copy full SHA for 7685cc6
1 file changed
app/src/main/java/com/finoldigital/ygolp/presentation/MainActivity.kt
@@ -265,9 +265,13 @@ class MainActivity : ComponentActivity() {
265
navController = navController,
266
startDestination = "lifepoints/1" // Start with player 1
267
) {
268
- composable("lifepoints/{player}") { backStackEntry ->
269
- val player =
270
- backStackEntry.arguments?.getString("player")?.toIntOrNull() ?: 1
+ composable(
+ "lifepoints/{player}",
+ arguments = listOf(
271
+ navArgument("player") { type = NavType.IntType }
272
+ )
273
+ ) { backStackEntry ->
274
+ val player = backStackEntry.arguments?.getInt("player") ?: 1
275
if (player == 1) {
276
LifePointsScreen(
277
displayedLifePoints = displayedLifePoints,
0 commit comments