package Ġcom . fab irt . ro ka . features . categories . presentation . view model Ċ Ċ import Ġandroidx . h ilt . lifecycle . ViewModel Inject Ċ import Ġandroidx . lifecycle .* Ċ import Ġandroidx . paging .* Ċ import Ġcom . fab irt . ro ka . core . constants . K Ċ import Ġcom . fab irt . ro ka . core . data . network . services . Recipe Service Ċ import Ġcom . fab irt . ro ka . core . domain . model . Recipe Ċ import Ġcom . fab irt . ro ka . features . categories . domain . model . Category Item Ċ import Ġcom . fab irt . ro ka . features . categories . domain . repository . Filtered Recipes Paging Source Ċ import Ġkotlinx . coroutines . flow . Flow Ċ Ċ class ĠCategory Detail ViewModel Ġ@ ViewModel Inject Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġservice : ĠRecipe Service Ċ ) Ġ: ĠViewModel () Ġ{ ĊĊĠĠĠ Ġvar Ġrecipes Flow : ĠFlow < Paging Data < Recipe >> ? Ġ= Ġnull ĊĊĠĠĠ Ġfun Ġrequest Recipes For Category ( category Item : ĠCategory Item ) Ġ{ ĊĠĠĠĠĠĠĠ Ġrecipes Flow Ġ= ĠP ager ( Paging Config ( K . REC IP ES _ PER _ PAGE )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġoptions Ġ= Ġmap Of ( category Item . type Ġto Ġcategory Item . name ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠFilter ed Recipes Paging Source ( service , Ġoptions ) ĊĠĠĠĠĠĠĠ Ġ}. flow ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. cached In ( viewModel Scope ) ĊĠĠĠ Ġ} Ċ }