package Ġcom . man u . pok ed o ke . view models Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġcom . man u . pok ed o ke . model . Pokemon Info Ċ import Ġcom . man u . pok ed o ke . repository . Detail Repository Ċ import Ġcom . man u . pok ed o ke . repository . Main Repository Ċ import Ġcom . man u . pok ed o ke . view state . ViewState ĊĊ Ċ class ĠDetail Activity ViewModel ( private Ġval Ġdetail Repository : ĠDetail Repository ) Ġ: ĠViewModel () Ġ{ ĊĊĠĠĠ Ġval Ġpokemon Info Data Ġ: ĠLive Data < ViewState < Pokemon Info >> Ġ= Ġdetail Repository . pokemon Details LiveData ĊĊĊĠĠĠ Ġfun Ġfetch Pokemon Details ( name : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġdetail Repository . get Pokemon Details ( name ) ĊĠĠĠ Ġ} Ċ Ċ }