Skip to content

Commit

Permalink
🐛 Safe guard adding new Floating events
Browse files Browse the repository at this point in the history
- Fixes [#157](#157)
  • Loading branch information
aditya-css committed Dec 20, 2023
1 parent 13a55e7 commit 09b09a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
2 changes: 1 addition & 1 deletion lib/src/credit_card_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ class _CreditCardWidgetState extends State<CreditCardWidget>
}

void _processFloatingEvent(FloatingEvent? event) {
if (event == null || controller.isAnimating) {
if (!mounted || event == null || controller.isAnimating) {
return;
}

Expand Down

0 comments on commit 09b09a8

Please sign in to comment.