package Ġcom . m ash up . healthy up . features . setting Ċ Ċ import Ġandroidx . lifecycle . viewModel Scope Ċ import Ġcom . m ash up . healthy up . Key Ċ import Ġcom . m ash up . healthy up . base . Base ViewModel Ċ import Ġcom . m ash up . healthy up . bridge . Web Preference Ċ import Ġcom . m ash up . healthy up . core . Empty Ċ import Ġcom . m ash up . healthy up . domain . entity . User Ċ import Ġcom . m ash up . healthy up . domain . use case . GetUser UseCase Ċ import Ġdagger . h ilt . android . lifecycle . H ilt ViewModel Ċ import Ġkotlinx . coroutines . flow . Sharing Started Ċ import Ġkotlinx . coroutines . flow . State Flow Ċ import Ġkotlinx . coroutines . flow . flow Ċ import Ġkotlinx . coroutines . flow . state In Ċ import Ġjavax . inject . Inject Ċ Ċ @ H ilt ViewModel Ċ class ĠSetting ViewModel Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġuser UseCase : ĠGetUser UseCase , ĊĠĠĠ Ġprivate Ġval Ġweb Preference : ĠWeb Preference Ċ ) Ġ: ĠBase ViewModel () Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġ_ user Ġ= Ġflow Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġid Token Ġ= Ġweb Preference . preference . getString ( Key . TOKEN , ĠString . Empty ). toString () ĊĠĠĠĠĠĠĠ Ġval Ġuser Ġ= Ġuser UseCase . getUser Info ( id Token ) ĊĠĠĠĠĠĠĠ Ġemit ( user ) ĊĠĠĠ Ġ}. state In ( viewModel Scope , ĠSh aring Started . L az ily , ĠUser . EMPTY ) ĊĊĠĠĠ Ġval Ġuser : ĠState Flow < User > ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ_ user Ċ } Ċ