toggle

abstract suspend fun toggle(featureId: String)(source)

Toggle a feature's enabled state.

If the feature is currently enabled, it will be disabled, and vice versa.

Implementations should ensure this operation is atomic to prevent race conditions.

Example:

store.toggle("my-feature") // Switches between enabled/disabled

Parameters

featureId

Feature unique identifier

Throws

if feature doesn't exist