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

modifying border around phone number. #449

Open
colinbes opened this issue Nov 8, 2024 · 1 comment
Open

modifying border around phone number. #449

colinbes opened this issue Nov 8, 2024 · 1 comment

Comments

@colinbes
Copy link

colinbes commented Nov 8, 2024

In order to keep consistency with other items on my form I want to have the phone number entry look the same as other entries and I either need to change the rounded corner border (around phone number) to an underline or preferable have no border at all.
Documentation is a little sparse and I have been messing around with inputDecoration, searchBoxDecoration and inputBorder to no avail.

Short of digging into source code I don't how to remove the border, advise on each of these decorations. borders will be a huge help

@colinbes
Copy link
Author

colinbes commented Nov 8, 2024

So I managed to get rid of the border around the phone number - see inputDecoration snippet below.

Now I would like to encapsulate the country flag, code and phone number in a box with rounded corners with floating label same as for TextFormField. I can wrap InternationalPhoneNumberInput in a decorated box and stack floating label but this seems to be a lot more work.

Any suggestions on whether this can be done with stock InternationalPhoneNumberInput widget. The readme page does state highly customizable with same images but no code to give an idea.

I am aiming to have phone number look and behave the same as a textformfield shown on right hand side of InternationalPhoneNumberInput.

Screenshot 2024-11-08 at 3 14 29 PM
 inputDecoration: const InputDecoration(
              isDense: true,


              border: InputBorder.none,
              enabledBorder: InputBorder.none,
              focusedBorder: InputBorder.none,
              errorBorder: InputBorder.none,
              hintText: 'Phone Number',
              // contentPadding: EdgeInsets.only(left: -25, bottom: 15),
            ),

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

No branches or pull requests

1 participant