diff --git a/CHANGELOG.md b/CHANGELOG.md index b020300..022fefc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# [4.0.2](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/tree/4.0.2) [UNRELEASED] + +- Fixed floating event stream bad state exception [#157](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/issues/157). + # [4.0.1](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/tree/4.0.1) - Fixed glare effect issue [#154](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/pull/154). diff --git a/lib/src/credit_card_widget.dart b/lib/src/credit_card_widget.dart index 8b55432..f5083c1 100644 --- a/lib/src/credit_card_widget.dart +++ b/lib/src/credit_card_widget.dart @@ -359,7 +359,7 @@ class _CreditCardWidgetState extends State } void _processFloatingEvent(FloatingEvent? event) { - if (event == null || controller.isAnimating) { + if (!mounted || event == null || controller.isAnimating) { return; }