number_formatter 0.0.2 copy "number_formatter: ^0.0.2" to clipboard
number_formatter: ^0.0.2 copied to clipboard

A Flutter package to format numbers with K, M, B suffixes example 1000 = 1k, 3600 = 3.6k 100,000 = 100k.

example/README.md

import 'package:flutter/material.dart';
import 'package:number_formatter/number_formatter.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Number Formatter Example'),
        ),
        body: Center(
          child: NumberDisplay(),
        ),
      ),
    );
  }
}

class NumberDisplay extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    int number1 = 1000;
    int number2 = 1200;
    int number3 = 2500000;

    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: <Widget>[
        Text('Formatted number1: ${formatNumber(number1)}'),
        Text('Formatted number2: ${formatNumber(number2)}'),
        Text('Formatted number3: ${formatNumber(number3)}'),
      ],
    );
  }
}



2
likes
160
points
507
downloads

Publisher

verified publishercodingpride.solutions

Weekly Downloads

A Flutter package to format numbers with K, M, B suffixes example 1000 = 1k, 3600 = 3.6k 100,000 = 100k.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

More

Packages that depend on number_formatter