intWord function

String intWord(
  1. int value
)

Convert a large integer to a friendly text representation. Works best for numbers over 1 million. For example, 1000000 becomes '1.0 million', 1200000 becomes '1.2 million' and '1200000000' becomes '1.2 billion'.

Implementation

String intWord(int value) {
  if (value < 1000000){
    return "$value";
  }
  // TODO : Implement numbers Hight to 1M
}