round function

double round(
  1. double value,
  2. {int decimals = 6}
)

Rounds value to given number of decimals

Implementation

double round(final double value, { final int decimals: 6 })
    => (value * math.pow(10,decimals)).round() / math.pow(10,decimals);