number_editing_controller 1.3.1 copy "number_editing_controller: ^1.3.1" to clipboard
number_editing_controller: ^1.3.1 copied to clipboard

Number Editing Controller - number or amount editing controller

number_editing_controller #

Pub Version GitHub

Missing number input controller for flutter apps

Features #

  • formats as-you-type text fields as numbers (decimals, currency or integers)
  • extracts num value from the input
  • an example with final controller = NumberEditingTextController.currency(currencyName: 'JPY'); controller

iPhone 14

Getting started #

  • install the library
flutter pub add number_editing_controller

Usage #

Working example can be found in /example directory

  • first you should define your controller

integer input #

final controller = NumberEditingTextController.integer();

decimal input #

final controller = NumberEditingTextController.decimal();

currency amount input #

final controller = NumberEditingTextController.currency();
  • optionally you can provide locale to use locale-based formatting

  • for currency() there's also currencyName and currencySymbol parameters available

  • you can set allowNegative to false to allow only unsigned input

  • set this controller as the controller for the target TextField

  • now the TextField would filter out all non-integer symbols

  • you can extract the value with controller.number

6
likes
150
pub points
83%
popularity

Publisher

verified publishernerdy.pro

Number Editing Controller - number or amount editing controller

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, intl

More

Packages that depend on number_editing_controller