toDoubleStringAsFixed method

String toDoubleStringAsFixed(
  1. {int digit = 2}
)

Use this extension method to get fixed values after decimal with defined length.

Implementation

String toDoubleStringAsFixed({int digit = 2}) =>
    toStringAsFixed(truncateToDouble() == this ? 0 : digit);