RoundNumberDirective class final

Rounds a numeric value to the nearest integer (as double).

Uses round-half-away-from-zero rounding (e.g., 2.5 → 3.0, -2.5 → -3.0).

Inspired by CSS round() function.

Inheritance

Constructors

RoundNumberDirective()
const

Properties

hashCode int
The hash code for this object.
no setteroverride
key String
The unique identifier for this directive type.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

apply(num value) num
Applies the transformation to the given value.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override