package Ġde . ost kont ent itan . track switch Ċ Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . viewModel Scope Ċ import Ġdagger . h ilt . android . lifecycle . H ilt ViewModel Ċ import Ġkotlinx . coroutines . flow . Mutable State Flow Ċ import Ġkotlinx . coroutines . flow . State Flow Ċ import Ġkotlinx . coroutines . launch Ċ import Ġjavax . inject . Inject Ċ Ċ @ H ilt ViewModel Ċ class ĠMain ViewModel Ġ@ Inject Ġconstructor ( private Ġval Ġtrack Switch er : ĠTrack Switch er ) Ġ: ĠViewModel () Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġ_ state Flow Ġ= ĠMutable State Flow < Main Screen State >( Main Screen State . Loading ) ĊĠĠĠ Ġval Ġstate Flow : ĠState Flow < Main Screen State > Ġ= Ġ_ state Flow ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ ĠviewModel Scope . launch Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġab Test Variant Ġ= Ġtrack Switch er . get Track For ( Test Variants Switch ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ_ state Flow . emit ( Main Screen State . Ready ( false , Ġab Test Variant . key )) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ