Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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,
),
```