checkNumeric static method
@param contents string to check for numeric characters @throws IllegalArgumentException if input contains characters other than digits 0-9.
Implementation
static void checkNumeric(String contents) {
if (!_numeric.hasMatch(contents)) {
throw ArgumentError('Input should only contain digits 0-9 ($contents)');
}
}