popUntil method
Pops to value of given test
. All next values are removed from stack.
Implementation
void popUntil(Predicate<T?> test) {
int index = _stack.indexWhere(test);
if (index > -1) {
_stack.removeRange(index, _stack.length);
}
_notifyParent();
}