getIntByValueStr static method

int? getIntByValueStr(
  1. String valueStr, {
  2. int? defValue = 0,
})

get int by value str.

Implementation

static int? getIntByValueStr(String valueStr, {int? defValue = 0}) {
  return int.tryParse(valueStr) ?? defValue;
}