isDigit function

bool isDigit(
  1. String char
)

Returns true if the character is a digit.

Implementation

bool isDigit(String char) => RegExp(r'^\d+$').hasMatch(char);