isNumero static method

bool isNumero(
  1. String numero
)

Implementation

static bool isNumero(String numero) {
  try {
    var isDouble = double.tryParse(numero);
    var isInt = int.tryParse(numero);
    return isDouble != null || isInt != null;
  } catch (e) {
    return false;
  }
}