isInteger property

bool isInteger

Return true if all the characters are int (0-9).

Example :

print('This123'.isAlNum); // false
print('123'.isAlNum); // true
print('This@123'.isAlNum); // false

Implementation

bool get isInteger => RegExp(r'^\p{N}+$', unicode: true).hasMatch(this);