package Ġcom . pri am bu di 1 9 . mov iest v shows . ui . view model Ċ Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . live Data Ċ import Ġandroidx . lifecycle . viewModel Scope Ċ import Ġandroidx . paging . cached In Ċ import Ġcom . pri am bu di 1 9 . mov iest v shows . data . repository . Movie Repository Ċ Ċ class ĠMovie ViewModel ( private Ġval Ġrepo : ĠMovie Repository ) Ġ: ĠViewModel () Ġ{ ĊĊĠĠĠ Ġfun Ġget Pop ular Movie () Ġ= Ġlive Data Ġ{ ĊĠĠĠĠĠĠĠ Ġemit Source ( repo . get Pop ular Movies (). cached In ( viewModel Scope )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Top R ated Movie () Ġ= Ġlive Data Ġ{ ĊĠĠĠĠĠĠĠ Ġemit Source ( repo . get Top R ated Movies (). cached In ( viewModel Scope )) ĊĠĠĠ Ġ} ĊĊ Ċ }