Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 476 Bytes

README.md

File metadata and controls

28 lines (20 loc) · 476 Bytes

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