humanize_big_int library
A dart simple dart package to convert large numbers to a human readable format.
humanizeInt : Represents large numbers in terms of K, M, B, T etc. (1234 -> 1.2K) humanizeIntInd : Represents large numbers in terms of K, L, Cr (Indian Numbering System) etc. (1234 -> 1.2K)
Functions
-
humanizeInt(
int n) → String -
Function that converts large numbers to humanized form
Returns same if number < 1000
Else Returns rounded number with appropriate suffix
Eg:
234 -> 234
1000 -> 1K
1234 -> 1.2K
12340 -> 12K
123400 -> 123K
1234000 -> 1.2M
.... -
humanizeIntInd(
int n) → String -
Function that converts large numbers to humanized form
Returns same if number < 1000
Else Returns rounded number with appropriate suffix in Indian numbering system (Thousand, Lakhs and Crores)
Eg:
234 -> 234
1000 -> 1K
1234 -> 1.2K
12340 -> 12K
1234000 -> 12L
12340000 -> 1.2Cr ....