I use navigation library and safeargs for passing data. I define argument to fragment like that.
For me, I realized that I also needed to put the same arguments into the receiver fragment in navi_graph.xml as well in order for Arg class to be generated(already have directions). For example: