Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring of input_widget and validator, added ability to include padding below selector button #421

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

rfowler5
Copy link

@rfowler5 rfowler5 commented Feb 7, 2024

I cleaned up the logic dealing with validation of input_widget, addressing the following: #385

As part of cleaning up the logic, I fixed the return type of the phone number utils validator (isValidNumber). The native code returns a boolean, so it should never be null anyway.

I added the ability to add padding below the country selector. This allows a consumer to fix an issue where the flag--when not used as a prefix icon--would jump up when a phone number validation error message displayed and caused the TextField to grow in height. The flag would jump up because more padding is added when the input_widget is in the error state. The consumer can now add padding and follow the work-around listed here (flutter/flutter#15400 (comment)) to keep both the flag and the phone input field fixed when error messages are displayed.

Some updates to the gradle version in the example also.

…istener. Added user-passable selectorButtonBottomPadding. Corrected method types in PhoneNumberUtil.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant