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