WeightConversionUtils class abstract final

Exact weight conversions between metric (kilograms) and imperial (pounds), plus human-readable string formatters.

As with LengthConversionUtils, the convert* primitives are the dependency-free core and propagate NaN/infinity; the *ToString formatters are an English-only convenience.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

convertKilogramsToPounds(double kilograms) double
Converts kilograms to pounds.
convertPoundsToKilograms(double pounds) double
Converts pounds to kilograms.
kilogramsToString(double kilograms, {bool useAbbreviations = false, int decimalPlaces = 2}) String
Formats kilograms as "80 kilograms" or "80 kg" with useAbbreviations.
poundsToString(double pounds, {bool useAbbreviations = false, int decimalPlaces = 2}) String
Formats pounds as "80 pounds" or "80 lbs" with useAbbreviations.

Constants

conversionFactor → const double
Kilograms → pounds multiplier (1 kg = 2.2046226218 lb). Full precision, defined once.