Created
January 8, 2022 07:28
-
-
Save Sinarahimi/9de51199aa0a0ec4852fecf6c6ac764c to your computer and use it in GitHub Desktop.
Pass data to Start Navigation
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
//MainFragment is an start Destination in navigation | |
class MainFragment:Fragmnet{ | |
// Dont use private val args: MainFragmentArgs by navArgs() to get the args if you wanted to pass data to startDestination | |
//Fragmnet | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
arguments?.get("Key") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
watch this gist