NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #3779 most downloaded on pub.dev
Facilitates working with physical quantities such as angles, lengths, masses, temperatures and many others. Supports uncertainty and arbitrary precision.
Last release 4 months ago
01 Jun 2026
Release timing varies
gaps range from 2 weeks to 2.8 years
Nearly every release is documented
notes for 16 of 17 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
17 releases · first in 2015
Dart 3+ Modernization: Applied sealed, base, and final modifiers to Number, Quantity, and Dimensions classes. Refactored map parsing and type determin
sealed, base, and final modifiers to Number, Quantity, and Dimensions classes. Refactored map parsing and type determination using modern pattern matching and switch expressions.
num and Number (e.g., 5.meters, 75.tps) and unit shortcuts (inKilometers, inTps, inCelsius).lib/quantity_core.dart.toJson() and fromJson() support to Quantity, Number, and Dimensions hierarchies.decimal package directly, introducing valueSIAsDecimal, toDecimal(), and fromDecimal(Decimal) to allow high-precision decimal operations.bin/update_nist_constants.dart to synchronize physical constants and uncertainties with the official NIST CODATA table.Quantity.parse(String text) for parsing natural language physical measurements (e.g., '120 km/h', '9.8 m/s^2').Quantity.checkDimensionalConsistency to symbolically check math formula consistency (e.g., s = u * t + 0.5 * a * t^2).Dimensions.describe returning human-readable dimensions (e.g. 'Length^1 / Time^2').Quantity.jsonSchema) for structured LLM function calling.Token and TokenRate classes to support modeling, parsing, and arithmetic for NLP/LLM context tracking and throughput metrics.Pixel, Resolution (pixels per length), and PixelDensity (pixels per area) classes to support spatial layout scaling, screen resolution calibration (PPI/DPI/DPCM), and graphics calculations with type-safe arithmetic operators.Irradiance / EnergyFluxDensity / PowerFluxDensity synonymizing HeatFluxDensity, Stress synonymizing Pressure, Work synonymizing Energy, etc.).lib/domain/ to group quantity types, units, and constants commonly encountered in specific fields: radiometry, atomic_nuclear, computing, chemistry, acoustics, and fluid_dynamics. Added corresponding unit tests for each domain.Dimensions algebra.Fraction number representation class, trig functions and constants in angle_ext, fluent utility extensions on num and Number, and verified variable mappings across all 40+ extension libraries. Further expanded coverage by testing astronomical time scale conversions, range math, exception string serialization, logarithmic level operations, and dynamically generated Unit constructors/derivatives across all 75+ physical quantity classes. Raised overall repository code coverage to 90.7% (surpassing the targets of 70% and 85%).One column per quarter.
Changed some compound unit constructor names to be more descriptive.
Units.singular property non-nullable.== operators now take an Object argument instead of dynamic,intl dependency to 0.19.0.e in number formatting/grouping.inverse method.Update lint dependency to ^3.0.0.
^3.0.0.* Fixed bugs in Precise class.
* Requires >= Dart SDK 3.0.
* Support for intl 0.18.
Support for Dart 2.12, null safety.
Number formatting; quantity text output.
Relaxed intl package version dependency to >=0.15.0 <1.0.0.
intl package version dependency to >=0.15.0 <1.0.0.Addressed many (but not all) analyzer items.
Nothing published for this version
Added isScalar and isScalarSI to Dimensions and Quantity.
isScalar and isScalarSI to Dimensions and Quantity.
* Fixed CHANGELOG.md formatting.
CHANGELOG.md formatting.Added operator == and hashCode to quantity range classes.
operator == and hashCode to quantity range classes.
toTypedQuantity to MiscQuantity.googol constant to arbitrary precision._dimensions constructor to _internal in quantities.Precise isInteger and _limitPrecision fixes.
Precise isInteger and _limitPrecision fixes.
hashCode testing for quantity objects (esp. Scalar)Temperature, TemperatureInterval tests, tweaks, bug fixes.
Temperature, TemperatureInterval tests, tweaks, bug fixes.* Initial version.
Your coding agent can read these notes before it upgrades. Set up the MCP server →