Numeral constructor

Numeral(
  1. num number, {
  2. int digitAfterDecimal = 0,
})

Creates a Numeral instance with the specified number and optional digitAfterDecimal.

The digitAfterDecimal parameter specifies the number of digits to display after the decimal point.

Throws an AssertionError if digitAfterDecimal is not less than 4.

Implementation

Numeral(this.number, {this.digitAfterDecimal = 0})
    : assert(digitAfterDecimal < 4);