number_formatter2 0.0.4
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