Issue
Is safeArgs plugin used for passing data or we can simply use it for navigation (even when we donot want to pass any data to the destination)? ... I have used navigation Component and safeArgs plugin but my question is should we use the safeArgs plugin just for simply navigating to a new fragment or use it only when we need to navigate with Passing a data ? please can someone help me understand this .... thank you !
Solution
As per the documentation:
The recommended way to navigate between destinations is to use the Safe Args Gradle plugin. This plugin generates simple object and builder classes that enable type-safe navigation between destinations. Safe Args is recommended both for navigating as well as passing data between destinations.
So it is recommended to always use Safe Args, whether you are passing data or not.
Answered By - ianhanniballake
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.