TinoGuo / pin_input_text_field

A textField widget to help display different style pin
Apache License 2.0
384 stars 83 forks source link

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

Closed kshkrao3 closed 4 years ago

kshkrao3 commented 4 years ago

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?

TinoGuo commented 4 years ago

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

kshkrao3 commented 4 years ago

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

kshkrao3 commented 4 years ago

@TinoGuo .. Works perfectly now.. 👍