integer static method
Integer only
Implementation
static String? integer(String? value, [String? message]) {
if (value == null || value.isEmpty) return null;
if (int.tryParse(value) == null) {
return message ?? 'Please enter a whole number';
}
return null;
}