Remove trailing 0 for Dart number string, gives you a pretty number or price.
More...
A Dart library that removes trailing zeros from the end of a number string and gives you a nicely formatted number string.
print('0.010'.trimZero()); // 0.01 double price = 99.00; print(price.toString().trimZero()); // 99
mihouse.tech
Repository (GitHub)View/report issues
API reference
MIT (license)
Packages that depend on trim_zero
Back