isNumeric property

bool get isNumeric

Checks if string is a number type of double or int

Implementation

bool get isNumeric => (isNotEmpty && (double.tryParse(this) != null || int.tryParse(this) != null)) || RegexUtils.numeric.hasMatch(this);