format 4.0.0
Format 4.0.0 follows 3.0.0 by a day and changes one thing in the public API:
the extension predicates.
Breaking for code written against 3.0.0:
canFormat,canLookup, andcanRepresentnow receive the extension'sT.
The engine checks the runtime type before invoking user code, and each
predicate accepts everyTby default. Remove an override that only returned
value is T; rewrite an additional filter fromObject?toT.
Code written against the published 1.6.0 is unaffected by this step — see
Migration from 1.6.0.
Also in this release:
{:c}and%cno longer convert ordinaryintvalues toBigIntwhile
validating Unicode scalars. In a local dart2js A/B on arm64, cached{:c}
fell from 133 ns to 56 ns and%cfrom 108 ns to 29 ns; realBigIntvalues
keep the same validation path.- The README gained a "Key differences from 1.6.0" section, including measured
ratios against 1.6.0 on the Dart VM, dart2js, and dart2wasm.
Packages:
format 4.0.0format_intl 1.0.1—
now resolves with bothformat3.x and 4.x.
See CHANGELOG.md
for the complete list.