toInt method
Converts a numeric string to an integer. Returns null if parsing fails or string is empty.
Implementation
int? toInt() {
if (this == null) return null;
return toDouble()?.toInt();
}
Converts a numeric string to an integer. Returns null if parsing fails or string is empty.
int? toInt() {
if (this == null) return null;
return toDouble()?.toInt();
}