package Ġcom . project . smart log . view model Ċ Ċ import Ġandroid . arch . lifecycle . ViewModel Ċ import Ġandroid . arch . lifecycle . ViewModel Provider Ċ import Ġcom . project . smart log . repository . Repository Ċ Ċ class ĠMain ViewModel Factory ( var Ġrepository : ĠRepository ) Ġ: ĠViewModel Provider . Factory Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġ< T Ġ: ĠViewModel ?> Ġcreate ( model Class : ĠClass < T >): ĠT Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠMainActivity ViewModel ( repository ) Ġas ĠT ĊĠĠĠ Ġ} Ċ }