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

Validator helper text position and style #215

Open
bradv123 opened this issue Nov 7, 2023 · 1 comment
Open

Validator helper text position and style #215

bradv123 opened this issue Nov 7, 2023 · 1 comment

Comments

@bradv123
Copy link

bradv123 commented Nov 7, 2023

I have a custom text form field widget, and I created a custom form field dropdown widget using DropdownButtonFormField2. In the image the top is the custom form field showing where I would want to be able to put the helper text, and the bottom is the DropdownButtonFormField2 with it's helper text.

One thing I cant seems to do is move the helper text that shows up when the validator fails. Is there any way around this? My best solution right now is to add padding under the DropdownButtonFormField2 in my custom widget (which I really only want to do when there is an error message to show), and I have added 4 spaces the the start of my error messages which gets is close but not the same
image

@israUSA
Copy link

israUSA commented Jun 12, 2024

For style in your DropdownButtonFormField2, use the property decoration and errorStyle.

DropdownButtonFormField2<String>(
   ......
    decoration: InputDecoration(
          .....
          errorStyle: TextStyle(
              color: AppTheme.errors,
              fontSize: 16
           )
           .....
     )
   ......

)

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

2 participants