package Ġio . github . hor ac io come 1 . re aque . ui . explore Ċ Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġio . github . hor ac io come 1 . re aque . data . posts . Posts Repository Ċ import Ġio . github . hor ac io come 1 . re aque . data . topics . Topics Repository Ċ Ċ class ĠExplo re ViewModel Factory ( ĊĠĠĠ Ġprivate Ġval Ġtopics Repository : ĠTop ics Repository , ĊĠĠĠ Ġprivate Ġval Ġposts Repository : ĠPosts Repository Ċ ) Ġ: ĠViewModel Provider . New Instance Factory () Ġ{ ĊĊĠĠĠ Ġ@ Suppress (" UN CHECK ED _ CAST ") ĊĠĠĠ Ġoverride Ġfun Ġ< T Ġ: ĠViewModel ?> Ġcreate ( model Class : ĠClass < T >) Ġ= ĊĠĠĠĠĠĠĠ ĠExplo re ViewModel ( topics Repository , Ġposts Repository ) Ġas ĠT Ċ Ċ }