numeral_system 2.0.0 copy "numeral_system: ^2.0.0" to clipboard
numeral_system: ^2.0.0 copied to clipboard

A package to show number in the form of International Numeral System(Millions, Billions, Trillions) and in Indian Numeral System(Lakh, Crore, Arab).

example/lib/main.dart

// ignore_for_file: prefer_const_constructors, prefer_const_literals_to_create_immutables

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

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(home: Demo());
  }
}

class Demo extends StatefulWidget {
  const Demo({super.key});

  @override
  State<Demo> createState() => _DemoState();
}

class _DemoState extends State<Demo> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Numeral System"),
        centerTitle: true,
      ),
      body: Center(
        child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              //By Default i.e INTERNATIONAL
              NumeralSystem(digit: 12345000),

              //ADDING TEXTSTYLE
              NumeralSystem(
                  digit: 987654,
                  digitAfterDecimal: DigitAfterDecimal.three,
                  textStyle: TextStyle(
                      fontSize: 20,
                      fontWeight: FontWeight.bold,
                      color: Colors.red)),

              // After decimal 5 digits
              NumeralSystem(
                numberSystem: NumberSystem.indian,
                digit: 987387659876,
                digitAfterDecimal: DigitAfterDecimal.two,
              ),

              //2 digits
              NumeralSystem(
                digit: 195659876,
                numberSystem: NumberSystem.indian,
                digitAfterDecimal: DigitAfterDecimal.three,
              ),
            ]),
      ),
    );
  }
}
5
likes
150
points
2
downloads

Publisher

verified publisherlvikramsah.com.np

Weekly Downloads

A package to show number in the form of International Numeral System(Millions, Billions, Trillions) and in Indian Numeral System(Lakh, Crore, Arab).

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on numeral_system