adar2378 / pin_code_fields

A flutter package which will help you to generate pin code fields with beautiful design and animations. Can be useful for OTP or pin code inputs 🤓🤓
https://pub.dev/packages/pin_code_fields
MIT License
699 stars 340 forks source link

inActiveBoxShadow does not work #388

Open NonymousMorlock opened 1 month ago

NonymousMorlock commented 1 month ago

When I pass the inActiveBoxShadow it simply doesn't work, only the activeBoxShadow works.

    final shadow = BoxShadow(
      color: Colors.black.withOpacity(.15),
      blurRadius: 7,
      offset: const Offset(0, 1),
    );
    return PinCodeTextField(
      appContext: context,
      length: 5,
      keyboardType: TextInputType.number,
      autoFocus: true,
      textStyle: GoogleFonts.poppins(
        fontSize: 16,
        fontWeight: FontWeight.w600,
        color: Colours.primary,
      ),
      pinTheme: PinTheme(
        shape: PinCodeFieldShape.box,
        borderRadius: BorderRadius.circular(5),
        fieldHeight: 50,
        fieldWidth: 48,
        activeFillColor: Colors.white,
        selectedFillColor: Colors.white,
        inactiveFillColor: Colors.white,
        activeColor: Colors.white,
        selectedColor: Colors.white,
        inactiveColor: Colors.white,
        activeBoxShadow: [shadow],
        disabledColor: Colors.white,
        inActiveBoxShadow: [shadow],
      ),
      enableActiveFill: true,
      onCompleted: (v) {
        debugPrint("OTP input Completed with $v");
      },
      beforeTextPaste: (text) => true,
    );

Expectation:

Screenshot from 2024-09-04 20-51-13

Reality:

Screenshot from 2024-09-04 20-51-46