toNum method

num? toNum({
  1. bool nullOnError = false,
})

Transform string to num type

Implementation

num? toNum({bool nullOnError = false}) =>
    nullOnError ? num.tryParse(this) : num.parse(this);