StyleResolver
A resolver that will resolve the properties of a given style lambda. An instance of this should be created and passed to the styleResolver modifier which will resolve the style lambda in context.
Summary
Public constructors |
|
|---|---|
StyleResolver(style: CommonStyle, styleState: StyleState) |
Cmn
|
Public functions |
||
|---|---|---|
open Unit |
Implements |
Cmn
|
open Unit |
Implements |
Cmn
|
open Unit |
Implements |
Cmn
|
inline R |
<R : Any?> resolve(block: StyleResolverScope.() -> R)Asks the |
Cmn
|
Public constructors
StyleResolver
StyleResolver(
style: CommonStyle,
styleState: StyleState = MutableStyleState(null)
)
| Parameters | |
|---|---|
style: CommonStyle |
a |
styleState: StyleState = MutableStyleState(null) |
a |
Public functions
onAbandoned
open fun onAbandoned(): Unit
Implements RememberObserver API to allow composition to manage the lifetime of the StyleResolver
onForgotten
open fun onForgotten(): Unit
Implements RememberObserver API to allow composition to manage the lifetime of the StyleResolver
onRemembered
open fun onRemembered(): Unit
Implements RememberObserver API to allow composition to manage the lifetime of the StyleResolver
resolve
inline fun <R : Any?> resolve(block: StyleResolverScope.() -> R): R
Asks the StyleResolver to resolve the properties of a given style lambda. The resolved properties can be read in block.
| Parameters | |
|---|---|
block: StyleResolverScope.() -> R |
called in a scope that allows style properties to be read. |