fromNumber static method

Decimal fromNumber(
  1. num value
)

Implementation

static Decimal fromNumber(num value) {
  if (value is int) {
    return Decimal.fromInt(value);
  }

  return fromDouble(value as double);
}