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
690 stars 336 forks source link

Fill Colors are not working. #295

Closed Anas-jed closed 1 year ago

Anas-jed commented 1 year ago
Flutter Doctor ``` [√] Flutter (Channel stable, 3.3.7, on Microsoft Windows [Version 10.0.19044.2251], locale en-US) • Flutter version 3.3.7 on channel stable at C:\Flutter\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision e99c9c7cd9 (3 weeks ago), 2022-11-01 16:59:00 -0700 • Engine revision 857bd6b74c • Dart version 2.18.4 • DevTools version 2.15.0 [√] Android toolchain - develop for Android devices (Android SDK version 33.0.0) • Android SDK at C:\Users\123\AppData\Local\Android\sdk • Platform android-33, build-tools 33.0.0 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [X] Visual Studio - develop for Windows X Visual Studio not installed; this is necessary for Windows development. Download at https://visualstudio.microsoft.com/downloads/. Please install the "Desktop development with C++" workload, including all of its default components [√] Android Studio (version 2021.3) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) [√] VS Code (version 1.73.1) • VS Code at C:\Users\123\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.52.0 [√] Connected device (4 available) • M2012K11AG (mobile) • 192.168.18.44:41793 • android-arm64 • Android 12 (API 31) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.2251] • Chrome (web) • chrome • web-javascript • Google Chrome 107.0.5304.107 • Edge (web) • edge • web-javascript • Microsoft Edge 107.0.1418.56 [√] HTTP Host Availability • All required HTTP hosts are available ! Doctor found issues in 1 category. ```
Container(
              padding: const EdgeInsets.symmetric(horizontal: 20),
              child: PinCodeTextField(
                appContext: context,
                length: 4,
                keyboardType: TextInputType.number,
                obscureText: false,
                textStyle: kBoldTextStyle.copyWith(
                    fontSize: 28, color: darkThemeProvider.themeText),
                animationType: AnimationType.fade,

                pinTheme: PinTheme(
                  shape: PinCodeFieldShape.box,
                  inactiveFillColor: Colors.red, // Unknown
                  activeColor: darkThemeProvider
                      .themeFieldBorder, //After written borderColor
                  activeFillColor: Colors.red, //Unknown
                  selectedColor: primary, // Active borderCOlor
                  inactiveColor: darkThemeProvider
                      .themeFieldBorder, //Before written borderColor
                  selectedFillColor: Colors.red, // Unknown

                  disabledColor: Colors.blue, // Unknown
                  errorBorderColor: Colors.red,
                  borderWidth: 1,
                  borderRadius: BorderRadius.circular(10),
                  fieldHeight: 50,
                  fieldWidth: 50,
                ),

                cursorColor: primary,
                // animationDuration: const Duration(milliseconds: 300),
                // backgroundColor: grey, //Colors.blue.shade50, //BackGround Color of while pin field

                // enableActiveFill: true,
                // errorAnimationController: errorController,
                controller: otpController,
                onCompleted: (v) {
                  log("Completed");
                },
                onChanged: (value) {
                  log(value);
                  setState(() {
                    currentText = value;
                  });
                },
              ),
            ),

I have wrote Unknown comment infront of the colors that are not showing anything.

What I want is to change the color of background color of Pin Code Back Container like below image.

Capture

Anas-jed commented 1 year ago

224 Ok my bad, enableActiveFill solution is answered already. Thanks. Just a suggestion of having some assertion or something should be there. or should be mention in docs.