getIntFromStr function

int getIntFromStr(
  1. dynamic str,
  2. {int defInt = 0}
)

Implementation

int getIntFromStr(dynamic str, {int defInt = 0}) {
  return isNumeric(str) ? int.parse(str) : defInt;
}