asNumOr method Null safety

num asNumOr(
  1. num defaultValue
)

Asserts that value is a number and returns it.

If value doesn't exist, this returns defaultValue.

Implementation

num asNumOr(num defaultValue) => asNum;