kite-runtime / jp.co.cyberagent.kite.runtime / androidx.activity.ComponentActivity / kiteDsl
kiteDsl¶
fun ComponentActivity.kiteDsl(kiteContext: KiteContext = KiteContext(), block: KiteDslScope.() ->
Unit
):
Unit
Creates a KiteDslScope and calls the specified kite DSL block with this scope. Can only invoke this function inside Activity.onCreate, otherwise IllegalStateException will be thrown.
Several element will be set into the KiteContext of this scope:
- Context
- Activity
- LifecycleOwner
- SaveStateHandle
These elements can be retrieved via their type as the key.
Parameters¶
kiteContext
- additional to context of the the scope.
block
- the DSL that will be invoked in the scope.