验证是否只包含数字
static bool isNumericOnly(String? text) { if (text?.isEmpty ?? true) return false; final regex = RegExp(r'^[0-9]+$'); return regex.hasMatch(text!); }