to_format 1.0.0 copy "to_format: ^1.0.0" to clipboard
to_format: ^1.0.0 copied to clipboard

Adds a toFormat instance method to big or decimal.

To Format #


Adds a toFormat instance method to num.

Install #

$ dart pub add to_format

Use #

import 'package:to_format/to_format.dart';

void main() {
  num x = 1234567.89;
  String formatted = x.toFormat(dp: 2, fmt: {'groupSeparator': ' '});
  print(formatted); // 1 234 567.89
}
1
likes
130
pub points
0%
popularity

Publisher

unverified uploader

Adds a toFormat instance method to big or decimal.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (license)

More

Packages that depend on to_format