primeAfter static method

dynamic primeAfter(
  1. int number
)

Find the first prime there is after the number

Implementation

static primeAfter(int number){
  number++;
  while(number.isPrime() == false){
    number++;
  }
  return number;
}