Coder Social home page Coder Social logo

Comments (8)

VOIDCRUSHER avatar VOIDCRUSHER commented on July 2, 2024 1

Hi @natintosh,

I agree with @guyzk 's suggestion to use a TextFormField since phone number input fields are usually used as part of a larger form. Is there any chance this would could be rolled into the next release?

As general feedback, I really appreciate all the great work. I like how you're exposing the InputDecoration for the TextField because it allows for more control over the form appearance. I am noting that, since the InputDecoration passed into InternationalPhoneNumberInput overrides the InputBorder and hintText constructor parameters, it could be confusing to include both. Might these be marked as Deprecated for future use since this is handled already by InputDecoration?

from intl_phone_number_input.

natintosh avatar natintosh commented on July 2, 2024 1

@natintosh any update on whether any of the requests are planned to be implemented in the near future?

Hi @guyzk, I'm totally working on it it just that I've been busy with office work the last update I add PhoneNumber object that you reference and I currently have a local branch that have fixes to issues you raised except the AR localization

from intl_phone_number_input.

natintosh avatar natintosh commented on July 2, 2024

Return phone number object which will return both the phone number and the country code and maybe the ISO code.

I like this idea rather than returning string of phone number, country code and country 2 letter code, I'll pass a single Object that contains all this

Please provide a way to style the input text.

You could always style the text field with either of this two constructor

InternationalPhoneNumberInput.withCustomDecoration
InternationalPhoneNumberInput.withCustomBorder

When an error text is provided the country code is not center aligned with the phone input which gives it an unprofessional look.

Help needed on this I need further information on this

The validation is not forwarded to the form so if the phone input is invalid (especially when there is more than 1 phone input) it is not reflected in the form validation (form will remain valid even if phone input is invalid).

Do you mean a Form validation as in TextFormField validation

Better support for RTL apps (my apps have several languages supported, some of which are RTL.

I'll look into this

Thanks for your feedback @guyzk πŸ‘πŸ‘πŸ‘

from intl_phone_number_input.

guyzk avatar guyzk commented on July 2, 2024

Thanks for the quick response!

I like this idea rather than returning string of phone number, country code and country 2 letter code, I'll pass a single Object that contains all this

Great! Maybe you could pass this object also in the "onSubmit" function.

When an error text is provided the country code is not center aligned with the phone input which gives it an unprofessional look.
Help needed on this I need further information on this

I think in the row that contains the dropdown and the input widget you should add the following:
crossAxisAlignment: CrossAxisAlignment.start,

You could always style the text field with either of this two constructor
InternationalPhoneNumberInput.withCustomDecoration
InternationalPhoneNumberInput.withCustomBorder

The text in the input widget it not in the decoration object but as a "style" attribute in the TextField (or TextFormField). This will require you to add another attribute ("textStyle"?) which will be passed to the TextField widget.

Do you mean a Form validation as in TextFormField validation

Yes! I think it will be best to change to a TextFormField (you will have the "validator" attribute) and have the validation passed to the parenting form.

from intl_phone_number_input.

guyzk avatar guyzk commented on July 2, 2024

@natintosh any update on whether any of the requests are planned to be implemented in the near future?

from intl_phone_number_input.

natintosh avatar natintosh commented on July 2, 2024

since the InputDecoration passed into InternationalPhoneNumberInput overrides the InputBorder and hintText constructor parameters, it could be confusing to include both. Might these be marked as Deprecated for future use since this is handled already by InputDecoration?

Oh it took a while for me to understand what you were trying to say here you are right but I can't mark it as deprecated because I'm currently exposing a constructor called with withCustomDecoration that does't accept hintText. I think I need to find a way to hide that from the the default constructor

from intl_phone_number_input.

guyzk avatar guyzk commented on July 2, 2024

Thanks for the update.
The RTL issue is really killing me so that I am not able to use the package at the moment.

from intl_phone_number_input.

guyzk avatar guyzk commented on July 2, 2024

Posted a solution for the RTL issue in the following issue
#16
Closing this one as all other features have been implemented
Thanks!!

from intl_phone_number_input.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.