@@ -23,6 +23,8 @@ A flutter package which will help you to generate pin code fields with beautiful
23
23
- Error animation. Currently have shake animation only. Watch the example app for how to integrate.
24
24
- Works with Flutter's Form. You can use Form validator right off the bat.
25
25
- Get currently typed text and use your condition to validate it. (for example: if (currentText.length != 6 || currentText != "your desired code"))
26
+ - Haptic Feedback support
27
+ - Animated obscure widget support
26
28
27
29
## Getting Started ⚡️
28
30
@@ -45,7 +47,7 @@ A flutter package which will help you to generate pin code fields with beautiful
45
47
## Properties 🔖
46
48
47
49
``` Dart
48
- /// The [BuildContext] of the application
50
+ /// The [BuildContext] of the application
49
51
final BuildContext appContext;
50
52
51
53
///Box Shadow for Pincode
@@ -59,11 +61,36 @@ A flutter package which will help you to generate pin code fields with beautiful
59
61
60
62
/// Character used for obscuring text if obscureText is true.
61
63
///
62
- /// Must not be empty. Single character is recommended.
64
+ /// Must not be empty. Single character is recommended. If obscuringWidget
65
+ /// is provided then it will be ignored.
63
66
///
64
67
/// Default is ● - 'Black Circle' (U+25CF)
65
68
final String obscuringCharacter;
66
69
70
+ /// Widget used to obscure text
71
+ ///
72
+ /// it overrides the obscuringCharacter
73
+ final Widget obscuringWidget;
74
+
75
+ /// Whether to use haptic feedback or not
76
+ ///
77
+ ///
78
+ final bool useHapticFeedback;
79
+
80
+ /// Haptic Feedback Types
81
+ ///
82
+ /// heavy, medium, light links to respective impacts
83
+ /// selection - selectionClick, vibrate - vibrate
84
+ /// check [HapticFeedback] for more
85
+ final HapticFeedbackTypes hapticFeedbackTypes;
86
+
87
+ /// Decides whether typed character should be
88
+ /// briefly shown before being obscured
89
+ final bool blinkWhenObscuring;
90
+
91
+ /// Blink Duration if blinkWhenObscuring is set to true
92
+ final Duration blinkDuration;
93
+
67
94
/// returns the current typed text in the fields
68
95
final ValueChanged<String> onChanged;
69
96
@@ -272,6 +299,14 @@ Thanks to everyone whoever suggested their thoughts to improve this package. And
272
299
<td align =" center " ><a href =" https://github.com/ItamarMu " ><img src =" https://avatars0.githubusercontent.com/u/27651221?v=3 " width =" 100px; " alt =" ItamarMu " /><br /><sub ><b >ItamarMu</b ></sub ></a ><br /><a href =" https://github.com/adar2378/pin_code_fields/commits?author=ItamarMu " title =" Code " >💻</a ></td >
273
300
<td align =" center " ><a href =" https://github.com/Margarets00 " ><img src =" https://avatars0.githubusercontent.com/u/39041161?v=3 " width =" 100px; " alt =" Kim Minju " /><br /><sub ><b >Kim Minju</b ></sub ></a ><br /><a href =" https://github.com/adar2378/pin_code_fields/commits?author=Margarets00 " title =" Code " >💻</a ></td >
274
301
</tr >
302
+
303
+ <tr >
304
+ <td align =" center " ><a href =" https://github.com/JSBmanD " ><img src =" https://avatars3.githubusercontent.com/u/5402335?s=400&v=4 " width =" 100px; " alt =" Dmitry Vakhnin " /><br /><sub ><b >Dmitry Vakhnin</b ></sub ></a ><br /><a href =" https://github.com/adar2378/pin_code_fields/commits?author=JSBmanD " title =" Code " >💻</a ></td >
305
+ <td align =" center " ><a href =" https://github.com/serendipity1004 " ><img src =" https://avatars3.githubusercontent.com/u/20388249?s=400 " width =" 100px; " alt =" serendipity1004 " /><br /><sub ><b >Jiho Choi</b ></sub ></a ><br /><a href =" https://github.com/adar2378/pin_code_fields/commits?author=serendipity1004 " title =" Code " >💻</a ></td >
306
+ <td align =" center " ><a href =" https://github.com/ened " ><img src =" https://avatars0.githubusercontent.com/u/269860?v=3 " width =" 100px; " alt =" Sebastian Roth " /><br /><sub ><b >Sebastian Roth</b ></sub ></a ><br /><a href =" https://github.com/adar2378/pin_code_fields/commits?author=ened " title =" Code " >💻</a ></td >
307
+ <td align =" center " ><a href =" https://github.com/BrunoEleodoro " ><img src =" https://avatars2.githubusercontent.com/u/20596317?s=400 " width =" 100px; " alt =" BrunoEleodoro " /><br /><sub ><b >Bruno Eleodoro Roza</b ></sub ></a ><br /><a href =" https://github.com/adar2378/pin_code_fields/commits?author=BrunoEleodoro " title =" Code " >💻</a ></td >
308
+
309
+ </tr >
275
310
</table >
276
311
277
312
** The pin code text field widget example**
@@ -323,6 +358,19 @@ enum PinCodeFieldShape { box, underline, circle }
323
358
enum AnimationType { scale, slide, fade, none }
324
359
```
325
360
361
+ ** Haptic Feedbacks can be among these 5 types**
362
+
363
+ ``` Dart
364
+ enum HapticFeedbackTypes {
365
+ heavy,
366
+ light,
367
+ medium,
368
+ selection,
369
+ vibrate,
370
+ }
371
+
372
+ ```
373
+
326
374
** Trigger Error animation** <br >
327
375
328
376
1 . Create a StreamController<ErrorAnimationType >
0 commit comments