isNumeric static method

bool isNumeric(
  1. String? s
)

是否为数字字符串

Implementation

static bool isNumeric(String? s) {
  if (s == null) return false;
  return double.tryParse(s) != null;
}