validatorNumber function

bool validatorNumber(
  1. dynamic value
)

Implementation

bool validatorNumber(value) {
  final RegExp re = RegExp(r'^[0-9]+$');
  final bool matches = re.hasMatch(value);
  return !matches;
}