removeFeatureState

suspend fun removeFeatureState(interactiveFeature: InteractiveFeature<*>, stateKey: String? = null): Expected<String, None>

Removes entries from a feature state based on interactiveFeature coming from an interaction callback.

Removes a specified property or all property from a feature's state object, depending on the value of stateKey.

Note that updates to feature state are asynchronous, so changes made by this method might not be immediately visible using getFeatureState.

Return

the optional error wrapped in Expected.

Parameters

interactiveFeature

The interactive feature coming from an interaction callback.

stateKey

The key of the property to remove. If null, all feature's state object properties are removed.