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

Flutter package for convert Number to Bangladesh (BD) Money Format, BD money format different than other country, Most of the country write as '12,34,56' but in Bangladesh write as 1,23,456 formation

bd_money_formatter #

BDMoneyFormatter is a Flutter package to formatting currencies according to the Bangladesh (BD) characteristics.

Package Version Style: Lints Dart CI Publish Package LICENSE codecov

last commit

Features #

  • Convert any Amount to BD Money format.
  • Support all kind of Data Types.
  • Suitable for al type of flutter applications.

Installation #

To use the 'Bangla Converter' Flutter package, follow these steps:

  1. Add the following line to the dependencies section in your project's pubspec.yaml file:
flutter pub add bd_money_formatter
  1. Import the package in your Dart code:
import 'package:bd_money_formatter/bd_money_formatter.dart';

Usage #

BD Money Formatter #

To Format, use the BDMoneyFormatter(decimalAmount).result.amount method

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

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  double amount = 2554413646;
  double decimalAmount = 97865466.352;
  double negativeDecimalAmount = -456978.32;
  BDMoneyFormatter output = BDMoneyFormatter(2554413646);
  final TextStyle _style = const TextStyle(
      color: Colors.black, fontSize: 16, fontWeight: FontWeight.bold);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text("BD Money Formatter"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'BD Money Formatter Example',
              style: _style.copyWith(fontSize: 20),
            ),
            Text(
              'It accept any kind of datatype',
              style: _style,
            ),
            const SizedBox(height: 20.0),
            const Divider(),
            Text(
              'You have enter amount: $amount',
              style: _style,
            ),
            Text(
              'Your output amount: ${output.result.amount}',
              style: _style,
            ),
            const Divider(),
            Text(
              'If Money is Decimal Number: $decimalAmount',
              style: _style,
            ),
            Text(
              'Your output amount: ${BDMoneyFormatter(decimalAmount).result.amount}',
              style: _style,
            ),
            const Divider(),
            Text(
              'If Money is Negative Decimal Number: $negativeDecimalAmount',
              style: _style,
            ),
            Text(
              'Your output amount: ${BDMoneyFormatter(negativeDecimalAmount).result.amount}',
              style: _style,
            ),
          ],
        ),
      ),
    );
  }
}

Example Render UI #

Demo #

For more complete samples, you can grab it from the example directory.

Help Me #

If you find some issues or bugs, please report here. You can also help in requesting new features here.

ChangeLog #

Are you curious about the changes that occur in each version? See here for detailed informations.

Contributions #

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

Contributors #

Masud99Rana

Masud Rana

License #

The 'BD Money Formatter' Flutter plugin is released under the MIT License.

0
likes
150
pub points
0%
popularity

Publisher

verified publisherpritom.me

Flutter package for convert Number to Bangladesh (BD) Money Format, BD money format different than other country, Most of the country write as '12,34,56' but in Bangladesh write as 1,23,456 formation

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on bd_money_formatter