验证是否为正整数
bool isPositiveInteger(String? s) { if (s == null || s.isEmpty) return false; const pattern = r'^[1-9]\d*$'; return hasMatch(s, pattern); }