Documentation
¶
Overview ¶
Package dartfmt formats numbers the way Dart's toString and toStringAsFixed do, so that text printed by ported Flutter code (diagnostics, dumps) reads the same.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Double ¶
Double formats x as Dart's double.toString does: "1.0" for an integral value, the shortest digits that read back as x otherwise, and an exponent ("1e-5", "1e+21") below 1e-4 and from 1e21.
func Duration ¶
Duration formats d as Dart's Duration.toString does: "H:MM:SS.mmmmmm", with a leading "-" for a negative duration and any number of hour digits.
func ToStringAsFixed ¶
ToStringAsFixed formats x with the given number of decimals as Dart's toStringAsFixed does: exact ties are rounded away from zero, where Go's formatting rounds them to even.
Types ¶
This section is empty.