isInt function
Checks if the string represents a valid integer.
Uses Dart's int.tryParse to determine if the string can be parsed as an integer.
This supports both positive and negative integers, as well as leading zeros.
Returns true if the string can be converted to an integer, otherwise returns false.
Example:
isInt('123'); // true
isInt('-123'); // true
isInt('01'); // true
isInt('12.34'); // false
isInt('abc'); // false
Implementation
bool isInt(String str) => _isInt(str);