Skip to content

Commit

Permalink
Add mounted check to animated_tab_visibility.dart (#1114)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsreichardt authored Oct 6, 2023
1 parent 0784b5d commit fe769c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/lib/homework/shared/animated_tab_visibility.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class _AnimatedTabVisibilityState extends State<AnimatedTabVisibility> {

void _animateVisibilityIfNecessary() {
final shouldBeVisible = _shouldChildBeVisible();
if (shouldBeVisible != isVisible) {
if (shouldBeVisible != isVisible && mounted) {
setState(() {
isVisible = shouldBeVisible;
});
Expand Down

0 comments on commit fe769c1

Please sign in to comment.