package Ġeu . bar on cel li . dk mp sample . shared . view model Ċ Ċ import Ġeu . bar on cel li . dk mp sample . shared . Debug Logger Ċ import Ġeu . bar on cel li . dk mp sample . shared . datal ayer . Repository Ċ import Ġkotlinx . coroutines . flow . State Flow Ċ import Ġkotlin . native . concurrent . Thread Local Ċ Ċ @ Thread Local Ċ val Ġdebug Logger Ġby Ġlazy Ġ{ ĠDebug Logger (" D - K MP ĠSAMPLE ") Ġ} ĊĊ Ċ class ĠD K MP ViewModel Ġ( repo : ĠRepository ) Ġ{ ĊĊĠĠĠ Ġcompanion Ġobject ĠFactory Ġ{ ĊĠĠĠĠĠĠĠ Ġ// Ġfactory Ġmethods Ġare Ġdefined Ġin Ġthe Ġplatform - specific Ġshared Ġcode Ġ( android Main Ġand Ġios Main ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġval Ġstate Flow : ĠState Flow < AppState > ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġstate Manager . mutable State Flow ĊĊĠĠĠ Ġprivate Ġval Ġstate Manager Ġby Ġlazy Ġ{ ĠState Manager ( repo ) Ġ} ĊĠĠĠ Ġval Ġnavigation Ġby Ġlazy Ġ{ ĠNavigation ( state Manager ) Ġ} Ċ Ċ }