An editable pin code text field for Flutter. Use this plugin for creating custom OTP value forms.
- Focus change to next field on number enter
- Focus change to previous on backspace
- Enter only 1 digit value per field
Getting Started #
See the project example for getting started with this plugin.
As shown on the example, you should limit
maxLength value to 1 & 2 respectively.
PinCodeTextField( maxLines: 1, maxLength: 2, ...
[0.1.0] - 7th August, 2019
- Working version of Pin Code Textfield Editor
A new Flutter project.
Getting Started #
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: editable_pin_field: ^0.1.0
2. Install it
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Jan 21, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.0
- pana: 0.13.4
- Flutter: 1.12.13+hotfix.5
Health issues and suggestions
lib/widget/pin_code_editable_text.dart. (-68 points)
lib/widget/pin_code_editable_text.dart failed with 3 errors, 5 warnings, 4 hints, including:
line 698 col 7: Missing concrete implementation of 'TextInputClient.connectionClosed'.
line 1144 col 9: The named parameter 'layerLink' isn't defined.
line 1205 col 11: Undefined name 'kMinInteractiveSize'.
line 1140 col 27: The parameter 'endHandleLayerLink' is required. .
line 1140 col 27: The parameter 'startHandleLayerLink' is required. .
lib/material/pin_code_text_field.dart. (-1 points)
lib/material/pin_code_text_field.dart reported 2 hints:
line 1035 col 9: 'onPointerEnter' is deprecated and shouldn't be used. Use MouseRegion.onEnter instead. See MouseRegion.opaque for behavioral difference. This feature was deprecated after v1.10.14..
line 1036 col 9: 'onPointerExit' is deprecated and shouldn't be used. Use MouseRegion.onExit instead. See MouseRegion.opaque for behavioral difference. This feature was deprecated after v1.10.14..
flutter format to format