hasComma method

bool hasComma(
  1. num number
)

Checks if the given number has a comma. (3.04 -> true, 3 -> false)

Implementation

bool hasComma(num number) {
  return number.toString().contains(".");
}