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

InputDecoration field #87

Closed
divan opened this issue Apr 25, 2024 · 4 comments
Closed

InputDecoration field #87

divan opened this issue Apr 25, 2024 · 4 comments

Comments

@divan
Copy link

divan commented Apr 25, 2024

Hey,

thanks for the wonderful plugin. Is it possible to use custom InputDecoration with this select?

I believe many people use it in forms, and use either custom InputDecoration or InputDecorationTheme to style form. With this select it seems to be impossible at the moment. To add to the confusion, the inputDecoration field has type Decoration, which is for styling Container, not the inputs.

One option is to use this Decoration property to mimic other inputs' style in the form. However, it doesn't solve the problem with stuff like errorText or helper text. Wrapping it up with InputDecorator class kind of helps, but still looks bad (hovering over the field with a rounded corner produces a highlighted box behind the field, etc), plus looks like a hack.

Is there a discussion of allowing users to provide custom InputDecoration for the field?

@Masadow
Copy link

Masadow commented Apr 26, 2024

Came across the same issue

I tried to apply them with

MultiSelectDropDown<T>(
  hintStyle: Theme.of(context).inputDecorationTheme.hintStyle,
  inputDecoration: BoxDecoration(
    color: Theme.of(context).inputDecorationTheme.fillColor,
    border: Theme.of(context).inputDecorationTheme.border != null 
      ? Border.fromBorderSide(Theme.of(context).inputDecorationTheme.border!.borderSide)
      : Border(bottom: BorderSide(color: Theme.of(context).inputDecorationTheme.outlineBorder?.color ?? Colors.black45)),
  ),
  ...
)

However, it's pretty hard to get borders to work correctly.

On top of that, there's a constraint put in the widget that forces a min height of 52 which can be problematic in most forms

@oi-narendra
Copy link
Owner

Try out Dev version

@oi-narendra
Copy link
Owner

Check Beta version.

@oi-narendra
Copy link
Owner

v3.0.0 now supports this. Please migrate to the latest version.

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

3 participants