TinoGuo/pin_input_text_field

Unable to change textborder for PinFieldAutoFill when global theme for textfield defined

kshkrao3 opened this issue · 3 comments

Hi,

I have already raised this issue via one more package which makes use of pin_input_text_field
Original Issue on the package I am using

I was told by the author of sms_autofill package that this issue has to be first fixed in pin_input_text_field.


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

image

See those grey lines above and below after each text box.. How can override the parent theme for this widget?

disabled the inputDecoration border in widget, it should works from 3.0.6

@TinoGuo .. Thank you so much for the timely help.. 🥇

@TinoGuo .. Works perfectly now.. 👍