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

Fix setState() called after dispose() Issue #303

Closed shaurya-src closed 1 year ago

shaurya-src commented 1 year ago

fixed issue where setState() was being called through listener even after the Widget was unmounted.

shaurya-src commented 1 year ago

Fixed Issue: https://github.com/adar2378/pin_code_fields/issues/302

adar2378 commented 1 year ago

Let’s create local _setState method that will check mounted = true before calling actual setState

adar2378 commented 1 year ago

Thanks for contributing

shaurya-src commented 1 year ago

Added the local method to check mounted before setting state

shaurya-src commented 1 year ago

@adar2378 Can you please review this PR and make a release with these changes?

adar2378 commented 1 year ago

Thanks!