package Ġcom . har sh il . trend ing news . ui . news list Ċ Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . viewModel Scope Ċ import Ġandroidx . paging . Experimental Paging Api Ċ import Ġandroidx . paging . Paging Data Ċ import Ġandroidx . paging . cached In Ċ import Ġcom . har sh il . trend ing news . data . Article Ċ import Ġcom . har sh il . trend ing news . repository . News List Repository Ċ import Ġkotlinx . coroutines . flow . Flow Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠNews List ViewModel Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġrepository : ĠNews List Repository Ċ ) Ġ: ĠViewModel () Ġ{ ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* Ġfetch Ġtop Ġhead lines ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Experimental Paging Api ĊĠĠĠ Ġval Ġtop Head lines : ĠFlow < Paging Data < Article >> Ġ= ĊĠĠĠĠĠĠĠ Ġrepository . fetch Top Head lines (). cached In ( viewModel Scope ) Ċ }