isNumeric property

bool get isNumeric

Checks if the string contains only numeric characters.

Implementation

bool get isNumeric => RegExp(r'^\d+$').hasMatch(this);