package Ġcom . example . weather app . screens . home Ċ Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ Ċ /** Ċ Ġ* ĠCreated Ġby Ġsh ande Ġon Ġ 1 1 - 0 1 - 2 0 2 1 . Ċ Ġ*/ Ċ class ĠHome Fragment ViewModel Factory ( private Ġval Ġhome Fragment Repository : ĠHome Fragment Repository ) Ġ: ĊĠĠĠ ĠViewModel Provider . Factory Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġ< T Ġ: ĠViewModel ?> Ġcreate ( model Class : ĠClass < T >): ĠT Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠHome Fragment ViewModel ( home Fragment Repository ) Ġas ĠT ĊĠĠĠ Ġ} Ċ }