package Ġcom . l ud ens . shared . requirements Ċ Ċ import Ġcom . l ud ens . shared . core . C Flow Ċ import Ġkotlinx . coroutines . Coroutine Dispatcher Ċ import Ġkotlinx . coroutines . flow . Shared Flow Ċ import Ġkotlin . reflect . K Class Ċ Ċ expect Ġabstract Ġclass ĠPlatform ViewModel () Ġ{ ĊĊĠĠĠ Ġprotected Ġfun Ġon Cle ared () ĊĊĠĠĠ Ġabstract Ġfun Ġdestroy () Ċ } Ċ Ċ expect Ġclass ĠView State Container < Base ViewState : ĠAny >() Ġ{ ĊĠĠĠ Ġfun Ġcontains ( type : ĠK Class < Base ViewState >): ĠBoolean ĊĠĠĠ Ġfun Ġto C Flows (): ĠList < C Flow < Base ViewState >> ĊĠĠĠ Ġfun Ġput ( type : ĠK Class < Base ViewState >, Ġshared Flow : ĠShared Flow < Base ViewState >) Ċ } Ċ Ċ expect Ġclass ĠResource Ċ Ċ expect Ġfun Ġensure MainThread () Ċ Ċ class ĠEnsure MainThread Exception Ġ: ĠIllegalStateException (" Should Ġbe Ġcalled Ġon Ġthe Ġmain Ġthread !") Ċ Ċ // ĠTODO : ĠNot Ġneeded Ġwhen Ġhttps :// github . com / Kotlin / kotlin x . coroutines / issues / 2 4 4 5 Ġgets Ġresolved Ċ expect Ġfun Ġshared Dispatcher (): ĠCor outine Dispatcher Ċ