package Ġcom . example . base app . util Ċ Ċ import Ġandroid . content . Context Ċ import Ġcom . example . base app . api . news . News Api Ċ import Ġcom . example . base app . api . news . News Client Ċ import Ġcom . example . base app . db . News Database Ċ import Ġcom . example . base app . repository . Articles Repository Ċ import Ġcom . example . base app . view model . Article List ViewModel Factory Ċ Ċ object ĠInject or Utils Ġ{ ĊĠĠĠ Ġfun Ġprovide Article List ViewModel Factory ( context : ĠContext ): ĠArticle List ViewModel Factory Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠArticle List ViewModel Factory ( get Articles Repository ( context )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġget Articles Repository ( context : ĠContext ) Ġ= ĠArticles Repository ( ĊĠĠĠĠĠĠĠ Ġget Articles Dao ( context ), ĊĠĠĠĠĠĠĠ Ġget News Client () ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġprivate Ġfun Ġget Articles Dao ( context : ĠContext ) Ġ= Ġget News Database ( context ). get Articles Dao () ĊĊĠĠĠ Ġprivate Ġfun Ġget News Database ( context : ĠContext ) Ġ= ĠNews Database . getInstance ( context ) ĊĊĠĠĠ Ġprivate Ġfun Ġget News Client () Ġ= ĠNews Client ( News Api ) Ċ } Ċ