increment

fun MutableStateFlow<Int>.increment(by: Int = 1): Int
fun MutableStateFlow<Long>.increment(by: Long = 1): Long

Adds by to the value and returns the new value.

The update is atomic with respect to concurrent updates. Pass a negative by to subtract.