roundTo method Null safety

double roundTo(
  1. [int places = 4]
)

Implementation

double roundTo([int places = 4]) {
  final mult = pow(10, places);
  return ((this * mult).roundToDouble()) / mult;
}