Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joutvhu/number_text_input_formatter
Number Text Input Formatter for Flutter
https://github.com/joutvhu/number_text_input_formatter
currency flutter formatter input number percentage text
Last synced: about 2 months ago
JSON representation
Number Text Input Formatter for Flutter
- Host: GitHub
- URL: https://github.com/joutvhu/number_text_input_formatter
- Owner: joutvhu
- License: mit
- Created: 2022-07-30T15:17:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-22T22:05:04.000Z (12 months ago)
- Last Synced: 2024-04-18T05:06:05.578Z (9 months ago)
- Topics: currency, flutter, formatter, input, number, percentage, text
- Language: Dart
- Homepage: https://pub.dev/packages/number_text_input_formatter
- Size: 40 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Number Text Input Formatter
Number Text Input Formatter for Flutter.
## Installation
```yaml
# Add into pubspec.yaml
dependencies:
number_text_input_formatter: ^lastVersion
```## Usage
For number
```dart
TextField(
inputFormatters: [
NumberTextInputFormatter(
integerDigits: 10,
decimalDigits: 2,
maxValue: '1000000000.00',
decimalSeparator: '.',
groupDigits: 3,
groupSeparator: ','
allowNegative: false,
overrideDecimalPoint: true,
insertDecimalPoint: false,
insertDecimalDigits: true,
),
],
keyboardType: TextInputType.number,
),
```For currency
```dart
TextField(
inputFormatters: [CurrencyTextInputFormatter()],
keyboardType: TextInputType.number,
),
```For percentage
```dart
TextField(
inputFormatters: [PercentageTextInputFormatter()],
keyboardType: TextInputType.number,
),
```