package Ġdev . sh rey as pat il . k td roid . ui . git game Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġdev . sh rey as pat il . k td roid . api . get GitHub Service Ċ import Ġdev . sh rey as pat il . k td roid . repository . UserRepository Ċ import Ġkotlinx . coroutines . Experimental Cor outines Api Ċ import Ġkotlinx . coroutines . Flow Preview Ċ import Ġkotlinx . coroutines . Internal Cor outines Api Ċ Ċ @ Experimental Cor outines Api Ċ @ Flow Preview Ċ @ Internal Cor outines Api Ċ class ĠGit Game ViewModel Factory ( private Ġval Ġcontext : ĠContext ) Ġ: ĠViewModel Provider . Factory Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġ< T Ġ: ĠViewModel ?> Ġcreate ( model Class : ĠClass < T >): ĠT Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġmodel Class . get Constructor ( UserRepository :: class . java ). newInstance ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠUser Repository ( get GitHub Service ( context )) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} Ċ }