Skip to content

Commit

Permalink
Fix toast state
Browse files Browse the repository at this point in the history
  • Loading branch information
sunarya-thito committed Feb 6, 2025
1 parent 9359baa commit f83344b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/src/components/overlay/toast.dart
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,13 @@ class _ToastLayerState extends State<ToastLayer> {
int currentCount = ++locationEntry.value._hoverCount;
Future.delayed(const Duration(milliseconds: 300), () {
if (currentCount == locationEntry.value._hoverCount) {
setState(() {
if (mounted) {
setState(() {
locationEntry.value._expanding = false;
});
} else {
locationEntry.value._expanding = false;
});
}
}
});
},
Expand Down

0 comments on commit f83344b

Please sign in to comment.