toInt static method
Converts a dynamic value to a non-nullable integer.
d
- The dynamic value to be converted.
def
- The default integer value if conversion fails.
Returns an integer.
Implementation
static int toInt(dynamic d, int def) {
return toIntN(d) ?? def;
}