Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Exception when closing the page with the CreditCardWidget (Bad state: Cannot add new events after calling close) #157

Closed
orangeyong opened this issue Nov 28, 2023 · 1 comment · Fixed by #161

Comments

@orangeyong
Copy link

When pop/closing the page with the CreditCardWidget, my Crashlytics is able to catch this error.

flutter: Bad state: Cannot add new events after calling close
flutter:
#0 _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:243:24)
#1 _CreditCardWidgetState._processFloatingEvent (package:flutter_credit_card/src/credit_card_widget.dart:366:24)
#2 _rootRunUnary (dart:async/zone.dart:1407:47)

To Reproduce
Steps to reproduce the behavior:

  1. Go to the page with CreditCardWidget
  2. Pop the page with the widget
  3. See error

Expected behavior
close the stream properly on dispose, maybe we need a controller to call for inside dispose?

  • iOS (I think android too)
  • flutter_credit_card 4.0.1
  • flutter 3.16.0
@mostafaAbdelazim
Copy link

Will you please publish this to pub ? latest version on pub is 4.0.1
@ParthBaraiya @aditya-css

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants