toInteger function

int? toInteger(
  1. String? value
)

Convert value to integer if defined, else return undefined. @param value value converted

Implementation

int? toInteger(String? value) {
  if (value == null) {
    return null;
  }
  return int.tryParse(value);
}