Decimal128 class abstract interface

Implemented types

Constructors

Decimal128.fromDouble(double value)
Converts a double into a Decimal128.
factory
Decimal128.fromInt(int value)
Converts a int into a Decimal128.
factory
Decimal128.parse(String source)
Parses a string into a Decimal128. Throws a FormatException if the string is not a valid Decimal128.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isNaN bool
Returns true if this is NaN.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

abs() Decimal128
Returns the absolute value of this.
compareTo(Decimal128 other) int
Compares this to other.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toInt() int
Converts this to an int. Possibly loosing precision.
toString() String
A string representation of this object.
inherited

Operators

operator *(Decimal128 other) Decimal128
Multiplies this with other and returns a new Decimal128.
operator +(Decimal128 other) Decimal128
Adds this with other and returns a new Decimal128.
operator -(Decimal128 other) Decimal128
Subtracts other from this and returns a new Decimal128.
operator /(Decimal128 other) Decimal128
Divides this by other and returns a new Decimal128.
operator <(Decimal128 other) bool
Returns true if this is less than other.
operator <=(Decimal128 other) bool
Returns true if this is less than or equal to other.
operator ==(Object other) bool
The equality operator.
inherited
operator >(Decimal128 other) bool
Returns true if this is greater than other.
operator >=(Decimal128 other) bool
Returns true if this is greater than or equal to other.
operator unary-() Decimal128
Negates this and returns a new Decimal128.

Static Properties

infinity Decimal128
The value +Inf.
no setter
nan Decimal128
The value NaN.
no setter
negativeInfinity Decimal128
The value -Inf.
no setter
one Decimal128
The value 1.
no setter
ten Decimal128
The value 10.
no setter
zero Decimal128
The value 0.
no setter

Static Methods

tryParse(String source) Decimal128?
Parses a string into a Decimal128. Returns null if the string is not a valid Decimal128.