package Ġcom . pl w ee g ie . android . tell adog . view models Ċ Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġcom . google . ml kit . common . model . Custom Remote Model Ċ import Ġcom . google . ml kit . common . model . Download Conditions Ċ import Ġjavax . inject . Provider ĊĊ Ċ class ĠModel Download ViewModel Factory ( ĊĠĠĠ Ġprivate Ġval Ġdownload Conditions : ĠProvider < Download Conditions >, ĊĠĠĠ Ġprivate Ġval Ġremote Model : ĠProvider < Custom Remote Model > Ċ ) Ġ: ĠViewModel Provider . New Instance Factory () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġ< T Ġ: ĠViewModel ?> Ġcreate ( model Class : ĠClass < T >): ĠT Ġ= ĊĠĠĠĠĠĠĠ ĠModel Download ViewModel ( download Conditions . get (), Ġremote Model . get ()) Ġas ĠT Ċ }