TransformItemState

class TransformItemState(var key: Any = Unit, var blockCompose: @Composable (Any) -> Unit = {}, var scope: CoroutineScope, var blockPosition: Offset = Offset.Zero, var blockSize: IntSize = IntSize.Zero, var intrinsicSize: Size? = null, var checkInBound: TransformItemState.() -> Boolean? = null)

TransformItem的状态与控制对象

Constructors

Link copied to clipboard
constructor(key: Any = Unit, blockCompose: @Composable (Any) -> Unit = {}, scope: CoroutineScope, blockPosition: Offset = Offset.Zero, blockSize: IntSize = IntSize.Zero, intrinsicSize: Size? = null, checkInBound: TransformItemState.() -> Boolean? = null)

Properties

Link copied to clipboard

实际TransformItem中显示的内容

Link copied to clipboard

TransformItem的绝对位置

Link copied to clipboard

TransformItem的大小

Link copied to clipboard

判断当前TransformItem是否在显示范围内的方法

Link copied to clipboard

传入blockCompose的固有大小

Link copied to clipboard
var key: Any

当前TransformItem的唯一标识

Link copied to clipboard
var scope: CoroutineScope

协程作用域

Functions

Link copied to clipboard
fun addItem(key: Any? = null, itemMap: ItemStateMap)

添加item到map上

Link copied to clipboard
fun checkIfInBound(itemMap: ItemStateMap, checkInBound: () -> Boolean)

判断item是否在所需范围内,返回true,则添加该item到map,返回false则移除

Link copied to clipboard
fun removeItem(key: Any? = null, itemMap: ItemStateMap)

从map上移除item