significant_format 0.0.2 icon indicating copy to clipboard operation
significant_format: ^0.0.2 copied to clipboard

This package provides a SignificantFormat class which formats a double value in significant figure in roundup or truncate mode. If locale is provided in input, the number will be formatted with thousa [...]

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add significant_format

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  significant_format: ^0.0.2

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:significant_format/significant_format.dart';
2
likes
80
pub points
0%
popularity

Publisher

unverified uploader

This package provides a SignificantFormat class which formats a double value in significant figure in roundup or truncate mode. If locale is provided in input, the number will be formatted with thousands separator (, or .) according to the locale provided.

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.BSD-3-Clause (LICENSE)

Dependencies

flutter, intl

More

Packages that depend on significant_format