package Ġna . ke ph as . kit ve i . view models Ċ Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġna . ke ph as . kit ve i . data . Search Repository Ċ import Ġna . ke ph as . kit ve i . data . Ver se Repository ĊĊ Ċ /** Ċ Ġ* ĠFactory Ġfor Ġcreating Ġa Ġ[ Search List ViewModel ] Ġwith Ġa Ġconstructor Ġthat Ġtakes Ġa Ġ[ Search Repository ]. Ċ Ġ*/ Ċ class ĠSearch List ViewModel Factory ( ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġrepository : ĠSearch Repository Ċ ) Ġ: ĠViewModel Provider . New Instance Factory () Ġ{ ĊĊĠĠĠ Ġ@ Suppress (" UN CHECK ED _ CAST ") ĊĠĠĠ Ġoverride Ġfun Ġ< T Ġ: ĠViewModel > Ġcreate ( model Class : ĠClass < T >) Ġ= ĠSearch List ViewModel ( repository ) Ġas ĠT Ċ Ċ } Ċ