-
-
Save dilrajsingh1997/661e5109e651db5e1e2f80b7f202700c to your computer and use it in GitHub Desktop.
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
class UserPageDestination { | |
data class UserPageArgs ( | |
val id: kotlin.Int, | |
val names: kotlin.collections.ArrayList<kotlin.String>, | |
) | |
companion object { | |
fun parseArguments(backStackEntry: NavBackStackEntry): UserPageArgs { | |
return UserPageArgs( | |
id = backStackEntry.arguments?.getInt("id") ?: 0, | |
names = backStackEntry.arguments?.getSerializable("names") as? kotlin.collections.ArrayList<kotlin.String> ?: throw NullPointerException("parcel value not found"), | |
) | |
} | |
val argumentList: MutableList<NamedNavArgument> | |
get() = mutableListOf( | |
navArgument("id") { | |
type = NavType.IntType | |
}, | |
navArgument("names") { | |
type = UserPage_NamesNavType | |
}, | |
) | |
fun getDestination(id: kotlin.Int, names: kotlin.collections.ArrayList<kotlin.String>, ): String { | |
return "UserPage?" + | |
"id=$id," + | |
"names=${Uri.encode(gson.toJson(names))}" + | |
"" | |
} | |
val route = "UserPage?id={id},names={names}" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment