asNum method

num asNum({
  1. num? def,
})

Implementation

num asNum({num? def}) {
  return num.tryParse(this.toString()) ?? def ?? 0;
}