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
706 stars 344 forks source link

pub.dev version is causing errors #334

Closed DimitarMilushev closed 1 year ago

DimitarMilushev commented 1 year ago

Greetings,

I've been receiving these annoying errors, caused by the blinkWhenObscuring functionality. Disabling it does fix the error, but It is a feature I don't wan't to disable. Here's the message:

I/flutter (31327): FATAL_ERROR: setState() called after dispose(): _PinCodeTextFieldState#c7430(lifecycle state: defunct, not mounted, tickers: tracking 0 tickers)
I/flutter (31327): This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback.
I/flutter (31327): The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree.
I/flutter (31327): This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose(). #0      State.setState.<anonymous closure> (package:flutter/src/widgets/framework.dart:

I can see that the fix has been pushed to master in #302, but not to pub.dev. I'm also not comfortable with using dependency_overrides as I prefer all of my packages to come from a single source.

Please, do sync the changes in pub.dev as they've been on hold for almost a year now

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.