agnamc9 / amount_formatter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An amount formatter.

Features

  • Format amount
  • Set separator character
  • Set currency

Installation

Add to pubspec.yaml

dependencies:
  amount_formatter: ^0.0.1

Usage

/// simple format
final amountFormatter = AmountFormatter();
amountFormatter.format('1000'); // 1 000

/// format with separator and currency
final amountFormatter = AmountFormatter(currency: 'FCFA', separator: ',');
amountFormatter.format('1000'); // 1,000 FCFA

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Dart 100.0%