toPrecision method

double toPrecision(
  1. dynamic n
)

Implementation

double toPrecision(n) {
  String d = this.toStringAsFixed(n);
  return double.parse(d);
}