currency_input_formatter 0.0.5 copy "currency_input_formatter: ^0.0.5" to clipboard
currency_input_formatter: ^0.0.5 copied to clipboard

Dart 1 only

A custom Flutter TextInputFormatter for currency values

currency_input_formatter #

A custom Flutter TextInputFormatter for currency values.

Demo

Usage #

Initialize it in the inputFormatters parameter of a TextField or TextFormField.

Currently, there are two parameters:

allowSubdivisions - Whether or not to allow non-whole number values.
subdivisionMarker - The string separator in between the whole number and subdivision parts of a currency value.

Short Example #

new TextField(
    autofocus: true,
    keyboardType: TextInputType.number,
    decoration: const InputDecoration(
        labelText: "Salary",
        prefixText: '\$',
    ),
    inputFormatters: <TextInputFormatter>[
      new CurrencyInputFormatter(
          allowSubdivisions: true,
          subdivisionMarker: "."
      ),
    ],
),
0
likes
20
pub points
0%
popularity

Publisher

unverified uploader

A custom Flutter TextInputFormatter for currency values

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on currency_input_formatter