popTo method
void
popTo(
- T value
Pops to given value
. All next values are removed from stack.
Implementation
void popTo(T value) {
int index = _stack.indexOf(value);
if (index > -1) {
_stack.removeRange(index, _stack.length);
}
_notifyParent();
}