toFixed method

double toFixed(
  1. int fractionDigits
)

Export from toFixedString then invoke double.parse. Therefore, it is impossible to invoke FormatException

Implementation

double toFixed(int fractionDigits) =>
    double.parse(toFixedDoubleStringValue(fractionDigits));