insertToListAtIndex

fun insertToListAtIndex(propertyPath: String, index: Int, item: ViewModelInstance)

Inserts an item into a list property at the specified index.

ℹ️ Changes to bound Rive elements will not be reflected until the next state machine advance.

Once the item is added to the list, you do not need to hold a reference to its instance. The list will also maintain a reference to the item.

Parameters

propertyPath

The path to the list property from this view model instance. Slash delimited to refer to nested properties.

index

The index at which to insert the item.

item

The view model instance to insert into the list.