isAlphanumeric property

bool get isAlphanumeric

Checks if the string contains only alphanumeric characters.

Example:

'Hello123'.isAlphanumeric; // true
'Hello!'.isAlphanumeric; // false

Implementation

bool get isAlphanumeric => RegExp(r'^[a-zA-Z0-9]+$').hasMatch(this);