trim static method

String trim(
  1. num value
)

Removes trailing zeros from the decimal portion of value.

Number.trim(12.0);   // '12'
Number.trim(12.30);  // '12.3'

Implementation

static String trim(num value) => _trimZeros(value.toString());