Skip to content

t-unit/big_decimal_intl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Big Decimal Intl

This package allows using NumberFormat of the intl package together with BigDecimal numbers.

Check out the pub.dev page for this package: https://pub.dev/packages/big_decimal_intl

Usage

First define a number format wrapped inside a BigDecimalFormatter object:

  final formatter = BigDecimalFormatter(NumberFormat.decimalPattern());

To format a number into at String us the format method:

  final formatted = formatter.format(BigDecimal.parse('1.5'));

To parse a number from a String use the parse method:

  final bigDecimal = formatter.parse('1.5');

Installation

With Dart:

 $ dart pub add big_decimal_intl

With Flutter:

 $ flutter pub add big_decimal_intl

Now in your Dart code, you can use:

import 'package:big_decimal_intl/big_decimal_intl.dart';

Additional information

This package is a port of the intl part of dart-decimal for BigDecimal.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages