indian_currency_to_word 1.0.0 copy "indian_currency_to_word: ^1.0.0" to clipboard
indian_currency_to_word: ^1.0.0 copied to clipboard

A Flutter package for both iOS and Android that converts a given amount to word in Indian Locale.

example/example.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import "package:indian_currency_to_word/indian_currency_to_word.dart";

class NoToWord extends StatefulWidget {
  const NoToWord({Key? key}) : super(key: key);

  @override
  State<NoToWord> createState() => _NoToWordState();
}

class _NoToWordState extends State<NoToWord> {
  final converter = AmountToWords();

  var number = 9999.10;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Number to Word'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            const Text(
              'With Decimal',
              style: TextStyle(fontSize: 18),
            ),
            const SizedBox(height: 20),
            Text(
              'Number: $number',
              style: const TextStyle(fontSize: 15),
            ),
            const SizedBox(height: 20),
            Text(
              'Word: ${converter.convertAmountToWords(number)}',
              style: const TextStyle(fontSize: 15),
            ),
            const SizedBox(height: 20),
            const Text(
              'Without Decimal',
              style: TextStyle(fontSize: 18),
            ),
            const SizedBox(height: 20),
            Text(
              'Number: $number',
              style: const TextStyle(fontSize: 15),
            ),
            const SizedBox(height: 20),
            Text(
              'Word: ${converter.convertAmountToWords(number, ignoreDecimal: true)}',
              style: const TextStyle(fontSize: 15),
            ),
          ],
        ),
      ),
    );
  }
}
7
likes
160
points
2.97k
downloads

Publisher

verified publisherdayananda.tech

Weekly Downloads

A Flutter package for both iOS and Android that converts a given amount to word in Indian Locale.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on indian_currency_to_word