removeWhen method

void removeWhen(
  1. bool test(
    1. dynamic item
    )
)

Implementation

void removeWhen(bool Function(dynamic item) test ){
  int storedItems = length;
  for(int i = 0; i < storedItems; i++){
    if(test(this[i])){
      removeAt(i);
      i--;
      storedItems--;
    }else{
      //Do nothing
    }
  }
}