toFixed method

num toFixed(
  1. int decimal
)

Implementation

num toFixed(int decimal) {
  num mod = pow(10.0, decimal);
  return (this * mod).round() / mod;
}