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 Oct 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.5.1
- pana: 0.12.21
- Flutter: 1.9.1+hotfix.4
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
Health issues and suggestions
lib/widget/pin_code_editable_text.dart. (-57.34 points)
lib/widget/pin_code_editable_text.dart failed with 2 errors, 5 warnings, 4 hints, including:
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.
line 1140 col 27: The parameter 'toolbarLayerLink' 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.
line 1036 col 9: 'onPointerExit' is deprecated and shouldn't be used.
flutter format to format