A simple dart package to convert large numbers to a human readable format. 1278 to 1.2K instead, for example.

Features

Represents large numbers in terms of K, M, B, T etc. (1234 -> 1.2K)

humanizeInt

IntegerHumanized
12781.2K
250250
1234000012M
123400000120M

humanizeIntInd

Represents large numbers in terms of K, L, Cr (Indian Numbering System) etc. (1234 -> 1.2K)

IntegerHumanized
12781.2K
250250
1234001.2L
12340000012Cr

Usage

humanizeInt

  final n1 = humanizeInt(1234); // 1.2K
  final n2 = humanizeInt(12340000); // 12M

humanizeIntInd

  final n1 = humanizeIntInd(1234); // 1.2K
  final n2 = humanizeIntInd(12340000); // 1.2Cr

Additional information

This package only offers this niche functionality. For more general use cases, checkout

Libraries

humanize_big_int
A dart simple dart package to convert large numbers to a human readable format.