Unable to change textborder for PinFieldAutoFill when global theme for textfield defined
See original GitHub issueHi,
I am using the PinFieldAutoFill
widget for OTP functionality. But, because of the global theme, I defined it is effecting this Widget too.
Decoration Defined for InputDecoration
InputDecorationTheme inputDecorationTheme() {
OutlineInputBorder outlineInputBorder = OutlineInputBorder(
borderRadius: BorderRadius.circular(28),
borderSide: BorderSide(color: bsTextColor),
gapPadding: 10,
);
return InputDecorationTheme(
contentPadding: const EdgeInsets.symmetric(
horizontal: 42,
vertical: 20,
),
enabledBorder: outlineInputBorder,
focusedBorder: outlineInputBorder,
border: outlineInputBorder,
);
}
Inside the MaterialApp I’ve defined it as following
theme: ThemeData(
inputDecorationTheme: inputDecorationTheme(),
)
But this is effecting the PinFieldAutoFill widget with BoxLooseDecoration and causes something like below
See those grey lines above and below after each text box… How can override the parent theme for this widget?
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Not able to change TextField Border Color - Stack Overflow
The new way to do it is to use enabledBorder like this: new TextField( decoration: new InputDecoration( enabledBorder: const ...
Read more >Change TextField Border Color in Flutter - RIGHT Way [2022]
You can change the TextField border color globally by defining the inputDecorationTheme and then adding the OutlineInputBorder widget.
Read more >InputDecoration class - material library - Flutter - Dart API docs
This sample shows how to style a TextField using an InputDecorator . The TextField displays a "send message" icon to the left of...
Read more >How to change border color of Material-UI TextField? - YouTube
Learn to change the border color of TextField component provided by Material-UI.You will learn about 2 components here TextField, ...
Read more >How To Change TextField's/TextFormField's Border Colors
If you have ever wondered how to completely control and change the colors of any TextField or TextFormField, then this video is your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m using
pin_input_text_field: ">=3.0.5 <4.0.0"
so you can runpub update
it should update to last available version 😃No never have that issue, and this field is coming from
pin_input_text_field
package so you might want to ask them about this ^^