这是indexloc提供的服务,不要输入任何密码

number_formatter2 0.0.4 copy "number_formatter2: ^0.0.4" to clipboard
number_formatter2: ^0.0.4 copied to clipboard

A simple number formatting utility for Flutter and Dart that formats numbers with commas and decimal points, e.g. 1,000.00

number_formatter #

A simple library for formatting numbers with commas and decimals.

Version #

1.0.0

Author #

Fatuma Chitu

Description #

number_formatter is a straightforward Dart library designed to help you format numbers easily by adding commas as thousands separators and handling decimal places cleanly.

Features #

  • Format numbers with commas (e.g., 1,000,000)
  • Manage decimal points consistently
  • Simple and easy-to-use API

Installation #

Add the following to your pubspec.yaml dependencies:

dependencies:

Then run:

flutter pub get

or if using Dart only:

dart pub get

Usage #

import 'package:number_formatter2/number_formatter2.dart';

void main() {
  var formatted = NumberFormatter.format(1234567.89);
  print(formatted); // Output: 1,234,567.89
}

Environment #

  • Dart SDK version: >=2.17.0 <4.0.0
2
likes
130
points
51
downloads

Publisher

unverified uploader

Weekly Downloads

A simple number formatting utility for Flutter and Dart that formats numbers with commas and decimal points, e.g. 1,000.00

Repository (GitHub)

Topics

#formatting #numbers #utility

Documentation

API reference

License

MIT (license)

Dependencies

flutter, intl

More

Packages that depend on number_formatter2