package Ġcom . explo sion 2 0 4 . battle ship . di . modules Ċ Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġcom . explo sion 2 0 4 . battle ship . view models . ViewModel Factory Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġjavax . inject . Provider Ċ import Ġjavax . inject . Singleton Ċ Ċ @ Module Ċ class ĠViewModel Factory Module Ġ{ ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun ĠviewModel Factory ( provider Map : ĠMap < Class < out ĠViewModel >, ĠProvider < ViewModel >> ): ĠViewModel Provider . Factory Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠViewModel Factory ( provider Map ) ĊĠĠĠ Ġ} Ċ }