jaumard / sms_autofill

Flutter plugin to provide SMS code autofill support
MIT License
281 stars 173 forks source link

cannot change PinFieldAutoFill's background color #194

Open CartmanGD opened 1 year ago

CartmanGD commented 1 year ago

I'm using the sms_autofill package to create an SMS verification page. I use the PinFieldAutoFill widget to insert the sms code.

I want the background color of the widget to be white instead of grey:

image

How do I change it?

Here is my code:

PinFieldAutoFill(
      autoFocus: autoFocus,
      codeLength: smsCode.length,
      currentCode: autoComplete ? smsCode : null,
      decoration: BoxLooseDecoration(
        strokeColorBuilder: PinListenColorBuilder(Colors.black, Colors.black26),
        bgColorBuilder: const FixedColorBuilder(Colors.white),
        strokeWidth: 1.2,
      ),
      onCodeChanged: (p0) {
        if (p0?.length == smsCode.length && !autoComplete) {
          context.read<LoginBloc>().add(LoginEventSubmitSmsCode(p0!));
        }
      },
    );
CartmanGD commented 1 year ago

Is this package deprecated? Can anyone help here please?

shivam0139 commented 1 year ago

Hi @CartmanGD you can use this package : https://pub.dev/packages/otp_pin_field