Using Wrap
to allow longer pin codes to wrap into another row
#165
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We love Pinput's UI and capabilities for entering typical 4-6 length pin codes. However, when faced with a very large key codes which are typical used for activating product keys or gift codes, it forces every input to stay inside a single row... With a 16-length gift code like we use, plus a few
-
to separate the code for easier readability, it makes it impossible to achieve a pleasant UI.After checking the package code for a bit I experimented with switching the
Row
widget which holds the inputs to aWrap
. It holds the same row-like structure up to the point where it needs to shrink. It is also very customizable, which is good for fitting into various UI layouts.It worked perfectly for us (as you can see in the screenshots below) and we're wondering if this would be a good addition to the package itself. Perhaps adding a 2nd widget or constructor which uses
Wrap
instead ofRow
is preferable, but I think that is up to the package owner to decide. Here are the small changes we did in order to make it work.