So, like the title says I'm trying to retrieve passed arguments from a bundle according to the documentation I'm following by using var args = GameWonFragmentArgs.fromBundle(arguments!!).
But Android Studio suggests using the following code:
var args = GameWonFragmentArgs.fromBundle(requireArguments())
I looked up the Android Documentation for Fragment and found that requireArguments() returns a @NonNull Bundle or an IllegalStateException. Why does Android Studio suggest using it and what's the difference between the two?
Also, I couldn't find relevant documentation about fromBundle().