Skip to content

Instantly share code, notes, and snippets.

@BKinya
Last active December 16, 2019 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BKinya/fe8942e714066801e821fc783f46f32c to your computer and use it in GitHub Desktop.
Save BKinya/fe8942e714066801e821fc783f46f32c to your computer and use it in GitHub Desktop.
Passing data from a destination using safe plugin
val name = usernameEditTxtview.text.toString()
if (name.isNotEmpty()){
//passing data between destinations with type safety using safe args
val action = LoginFragmentDirections.actionLoginFragmentToMainFragment(name)
findNavController().navigate(action)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment