I am using the widget as shown in the example, when I try to enter the first number of the pinfield it tells me that I am losing reference to a parent widget, I guess it is because the dispose is being called where it should not be.
LOG:
════════ Exception caught by widgets library ═══════════════════════════════════
Looking up a deactivated widget's ancestor is unsafe.
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════
Looking up a deactivated widget's ancestor is unsafe.
════════════════════════════════════════════════════════════════════════════════
CODE:
Directionality( textDirection: TextDirection.ltr, child: Pinput( length: 6, controller: pinController, focusNode: focusNode, hapticFeedbackType: HapticFeedbackType.lightImpact, cursor: Column( mainAxisAlignment: MainAxisAlignment.end, children: [ Container( margin: const EdgeInsets.only(bottom: 9), width: 22, height: 1, color: Colors.red, ), ], ), validator: (value) { return value == '222222' ? null : 'Pin is incorrect'; }, defaultPinTheme: pinTheme, focusedPinTheme: pinTheme.copyWith( decoration: pinTheme.decoration!.copyWith( borderRadius: BorderRadius.circular(8), border: Border.all(color: Color.fromRGBO(23, 171, 144, 1)), ), ), submittedPinTheme: pinTheme.copyWith( decoration: pinTheme.decoration!.copyWith( color: Color.fromRGBO(243, 246, 249, 0), borderRadius: BorderRadius.circular(19), border: Border.all(color: Color.fromRGBO(23, 171, 144, 1)), ), ), errorPinTheme: pinTheme.copyBorderWith( border: Border.all(color: Colors.redAccent), ), ), )
ERROR:
I am using the widget as shown in the example, when I try to enter the first number of the pinfield it tells me that I am losing reference to a parent widget, I guess it is because the dispose is being called where it should not be.
LOG: ════════ Exception caught by widgets library ═══════════════════════════════════ Looking up a deactivated widget's ancestor is unsafe. ════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════ Looking up a deactivated widget's ancestor is unsafe. ════════════════════════════════════════════════════════════════════════════════