isInt static method

bool isInt(
  1. dynamic v
)

Implementation

static bool isInt(v) {
  if (v == null) return true;
  if (v is num) return true;
  if (v is String) return int.tryParse(v) != null;
  return false;
}