Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hnvn/flutter_pattern_formatter
A Flutter package provides some implementations of TextInputFormatter that format input with pre-defined patterns
https://github.com/hnvn/flutter_pattern_formatter
flutter flutter-package formatters textinputformatter
Last synced: 3 months ago
JSON representation
A Flutter package provides some implementations of TextInputFormatter that format input with pre-defined patterns
- Host: GitHub
- URL: https://github.com/hnvn/flutter_pattern_formatter
- Owner: hnvn
- License: bsd-3-clause
- Created: 2019-01-02T10:55:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-23T04:21:26.000Z (10 months ago)
- Last Synced: 2024-01-21T04:02:27.869Z (5 months ago)
- Topics: flutter, flutter-package, formatters, textinputformatter
- Language: C++
- Homepage:
- Size: 1.02 MB
- Stars: 206
- Watchers: 8
- Forks: 76
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Lists
- awesome-flutter-mobile - pattern_formatter - A Flutter package provides some implementations of TextInputFormatter that format input with pre-defined patterns (Packages)
README
# PatternFormatter
[![pub package](https://img.shields.io/pub/v/pattern_formatter.svg)](https://pub.dartlang.org/packages/pattern_formatter) ![](https://github.com/hnvn/flutter_pattern_formatter/workflows/unit%20test/badge.svg) [![codecov](https://codecov.io/gh/hnvn/flutter_pattern_formatter/branch/master/graph/badge.svg)](https://codecov.io/gh/hnvn/flutter_pattern_formatter)
A Flutter package provides some implementations of TextInputFormatter that format input with pre-defined patterns
## How to use
```dart
import 'package:pattern_formatter/pattern_formatter.dart';
```### Thousands grouping
* Integer number:
![]()
```dart
TextField(
keyboardType: TextInputType.number,
inputFormatters: [
ThousandsFormatter()
],
)
```* Decimal number:
![]()
```dart
TextField(
keyboardType: TextInputType.number,
inputFormatters: [
ThousandsFormatter(allowFraction: true)
],
)
```### Card number grouping
![]()
```dart
TextField(
keyboardType: TextInputType.number,
inputFormatters: [
CreditCardFormatter(),
],
)
```### Date format
![]()
```dart
TextField(
keyboardType: TextInputType.number,
inputFormatters: [
DateInputFormatter(),
],
)
```