flutter-passcode icon indicating copy to clipboard operation
flutter-passcode copied to clipboard

added option for variable pin length

Open digitalhoax opened this issue 3 years ago • 4 comments

This PR adds the option to have a variable pin length. it adjusts the displayed dots accordingly and has a confirm button so you can confirm the pin.

digitalhoax avatar Mar 23 '22 14:03 digitalhoax

hi @digitalhoax , Thanks for contribution.

I see the point of having a flexible length, it makes sense, I will test your solution first to make sure it doesn't add unnecessary complexity to the package.

xPutnikx avatar Jun 13 '22 19:06 xPutnikx

Screenshot 2022-06-13 at 22 09 56 Screenshot 2022-06-13 at 22 11 11

I guess some limitation should be added to prevent user from entering way too many symbols.

For example Samsung limits up to 16 digits, with the current default dot size seems like 12 items fit the best. @digitalhoax what do you think?

xPutnikx avatar Jun 13 '22 20:06 xPutnikx

Yes, this seems an obvious improvement that needs to be made. Will get to it shortly and update the PR accordingly.

digitalhoax avatar Jun 23 '22 11:06 digitalhoax

I have limited the maximum number of chars to ten as that is what fits on some of my test devices' screen. Might be an option to decrease the font size on longer pins if the need for it arises.

digitalhoax avatar Nov 02 '22 12:11 digitalhoax