package Ġapplication . android . refresh . ui . cards . update Ċ Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġapplication . android . refresh . data . repository . Refresh Repository Ċ Ċ class ĠC ards Update ViewModel Factory ( private Ġval Ġrefresh Repository : ĠRefresh Repository ): ĠViewModel Provider . New Instance Factory () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġ< T Ġ: ĠViewModel ?> Ġcreate ( model Class : ĠClass < T >): ĠT Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠC ards Update ViewModel ( refresh Repository ) Ġas ĠT ĊĠĠĠ Ġ} Ċ }