popToIndex

fun popToIndex(index: Int)

Pops the back stack down to index (0 = root). All entries above index are removed. Use getHistory to determine the target index before calling this.