package Ġcom . ch ido zie . n . aad practice project . ui . leader board . fragment . view model Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . Transform ations Ċ import Ġandroidx . paging . Paged List Ċ import Ġandroidx . paging . to LiveData Ċ import Ġcom . ch ido zie . n . aad practice project . api . Repository Ċ import Ġcom . ch ido zie . n . aad practice project . db . Database Impl Ċ import Ġcom . ch ido zie . n . aad practice project . model . Learning Leader Ċ import Ġcom . ch ido zie . n . aad practice project . ui . util . Base ViewModel Ċ Ċ class ĠLearning Leader ViewModel Ġ: ĠBase ViewModel () Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġdao Ġ= ĠDatabase Impl . instance . learning Leader Dao () ĊĊĠĠĠ Ġval Ġobserve Learning Leader List : ĠLive Data < Paged List < Learning Leader >> ĊĠĠĠĠĠĠĠ Ġget () Ġ= ĠTransform ations . map ( dao . dataSource (). to LiveData ( 2 0 )) Ġ{ Ġit Ġ} ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ Ġfetch Learning Le aders () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġfetch Learning Le aders () Ġ{ ĊĠĠĠĠĠĠĠ Ġrun Api Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠRepository . fetch Learning Le aders () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ