package Ġcom . f ory ou and me . ui . auth . on boarding . step Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . View Ċ import Ġandroidx . fragment . app . view Models Ċ import Ġandroidx . navigation . fragment . nav Args Ċ import Ġcom . f ory ou and me . R Ċ import Ġcom . f ory ou and me . core . arch . android . Base Fragment Ċ import Ġcom . f ory ou and me . core . ext . find Ċ import Ġcom . f ory ou and me . ui . auth . Auth Nav Controller Ċ import Ġcom . f ory ou and me . ui . auth . on boarding . On boarding Fragment Ċ import Ġcom . f ory ou and me . ui . auth . on boarding . On boarding ViewModel Ċ import Ġdagger . h ilt . android . Android EntryPoint Ċ Ċ @ Android EntryPoint Ċ class ĠOn boarding Step Container Fragment Ġ: ĠBase Fragment ( ĊĠĠĠ ĠR . layout . on boarding _ step Ċ ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġargs : ĠOn boarding Step Container Fragment Args Ġby Ġnav Args () ĊĊĠĠĠ Ġval Ġon boarding ViewModel : ĠOn boarding ViewModel ĊĠĠĠĠĠĠĠĠĠĠĠ Ġby Ġview Models ( owner Producer Ġ= Ġ{ Ġon boarding Fragment () Ġ}) ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĊĠĠĠĠĠĠĠ Ġval Ġstep Ġ= Ġon boarding ViewModel . get Step ByIndex ( args . index ) ĊĊĠĠĠĠĠĠĠ Ġval Ġfragment Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstep ?. let Ġ{ Ġit . view () Ġ} ?. let Ġ{ ĠOn boarding Step Fragment . build With Params ( args . index , Ġit ) Ġ} ĊĊĠĠĠĠĠĠĠ Ġif Ġ( step Ġ!= Ġnull Ġ&& Ġfragment Ġ!= Ġnull ) Ġ{ ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġtransaction Ġ= Ġchild FragmentManager . beginTransaction () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction . add ( R . id . on boarding _ step , Ġfragment , Ġstep . identifier ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction . commit () ĊĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġon boarding Fragment (): ĠOn boarding Fragment Ġ= Ġfind () ĊĊĠĠĠ Ġfun Ġauth Nav Controller (): ĠAuth Nav Controller Ġ= Ġon boarding Fragment (). auth Nav Controller () Ċ Ċ }