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

Remove line decoration under every form item #252

Closed
christianarduino opened this issue Apr 7, 2020 · 5 comments
Closed

Remove line decoration under every form item #252

christianarduino opened this issue Apr 7, 2020 · 5 comments

Comments

@christianarduino
Copy link

Is there a fast way to remove this blue line that is automatically added under each item on the form?

image

@danvick
Copy link
Collaborator

danvick commented Apr 7, 2020

Hi @christianarduino.
Yes, you can! In your InputDecoration, set border to InputBorder.none.

You can apply this to the whole form by setting the attribute in your inputDecorationTheme.

@christianarduino
Copy link
Author

Maybe I'm the one who puts something wrong?

FormBuilderSlider(
  attribute: "slider",
  validators: [FormBuilderValidators.min(6)],
  min: 0.0,
  max: 10.0,
  initialValue: 1.0,
  divisions: 20,
  decoration: InputDecoration(
    labelText: "Number of things",
    border: InputBorder.none,
  ),
),

The blue border always remains also for other elements of the form (such as checkboxes).
The widget in the real code is inserted in a FormBuilder obviously

image

@danvick
Copy link
Collaborator

danvick commented Apr 7, 2020

It doesn't seem like it. I'm testing locally and everything seems to be working a-okay - I know classic answer ;-)
Which version of the package are you using?

@christianarduino
Copy link
Author

I think the latest: flutter_form_builder: ^3.8.2

@christianarduino
Copy link
Author

Okay, I found the solution. I had set inputDecorationTheme enabledBorder and focusedBorder. This way InputBorder.none doesn't work for individual elements of the form

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