poundsToString static method

  1. @useResult
String poundsToString(
  1. double pounds, {
  2. bool useAbbreviations = false,
  3. int decimalPlaces = 2,
})

Formats pounds as "80 pounds" or "80 lbs" with useAbbreviations.

Example:

WeightConversionUtils.poundsToString(80); // '80 pounds'

Audited: 2026-06-12 11:26 EDT

Implementation

@useResult
static String poundsToString(
  double pounds, {
  bool useAbbreviations = false,
  int decimalPlaces = 2,
}) =>
    '${pounds.formatDouble(decimalPlaces, showTrailingZeros: false)} '
    '${useAbbreviations ? 'lbs' : 'pounds'}';