isInteger property

bool get isInteger

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

print('Activity111'.isAlNum); // false
print('111'.isAlNum); // true

Implementation

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