format method

String format(
  1. String formatStr
)

Returns a string representation of this number with the format provided as a parameter.

Example: 123.456.format('0.00') -> 123.46.

Implementation

String format(String formatStr) => NumberFormat(formatStr).format(toDouble());