dropRightWhile method

List<T?> dropRightWhile(
  1. bool test(
    1. T? element
    )
)

Implementation

List<T?> dropRightWhile(bool Function(T? element) test) {
  var index = length - 1;
  while (index >= 0) {
    if (!test(this[index])) {
      break;
    }
    removeLast();
    index--;
  }
  return this;
}