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

thrown Null check operator used on a null value. Error thrown Instance of 'ErrorDescription' #286

Closed sumitstranger closed 1 year ago

sumitstranger commented 1 year ago

Getting this error on Firebase Crashlytics for the following version

Flutter: 2.8.1
pin_code_fields: ^7.4.0

Code:


import 'package:flutter/material.dart';
import 'package:pin_code_fields/pin_code_fields.dart';

import '../../app_imports.dart';

class InputPasscodeWidget extends StatelessWidget {
  final Function(String)? onCompleted;
  final Function(String) onChanged;
  final TextEditingController controller;
  final FocusNode? focusNode;
  InputPasscodeWidget({
    Key? key,
    required this.onCompleted,
    required this.onChanged,
    required this.controller,
    this.focusNode,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return InkWell(
      splashFactory: NoSplash.splashFactory,
      highlightColor: Colors.transparent,
      focusColor: Colors.transparent,
      child: Container(
        width: 192,
        height: 60,
        padding: EdgeInsets.fromLTRB(20, 20, 20, 10),
        child: PinCodeTextField(
          appContext: context,
          length: 4,
          obscureText: true,
          autoDisposeControllers: false,
          animationType: AnimationType.fade,
          autoFocus: true,
          autoDismissKeyboard: true, // Set this to true otherwise last digit will be not visible
          enableActiveFill: true,
          showCursor: false,
          pinTheme: PinTheme(
            shape: PinCodeFieldShape.circle,
            fieldWidth: 20,
            fieldHeight: 20,
            activeColor: COLOR_PRIMARY,
            activeFillColor: COLOR_PRIMARY,
            selectedColor: PINCODE_INACTIVE,
            selectedFillColor: PINCODE_INACTIVE,
            inactiveColor: PINCODE_INACTIVE,
            inactiveFillColor: PINCODE_INACTIVE,
            borderWidth: 0
          ),
          animationDuration: Duration(milliseconds: 300),
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          textStyle: TextStyle(color: Colors.transparent),
          pastedTextStyle: TextStyle(color: Colors.transparent),
          controller: controller,
          focusNode: focusNode,
          keyboardType: TextInputType.number,
          onCompleted: onCompleted,
          onChanged: onChanged,
        ),
      ),
      onTap: () => focusNode?.requestFocus(),
    );
  }
}

Firebase Crashlytics: Stack-Tree:

Screenshot 2022-09-14 at 1 33 10 PM

Keys:

Screenshot 2022-09-14 at 1 34 24 PM
stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

meet7-sagar23 commented 1 year ago

Still Occurring.