Skip to content

Commit

Permalink
fix: setState() called after dispose() 导致全屏失效
Browse files Browse the repository at this point in the history
  • Loading branch information
guozhigq committed Mar 5, 2024
1 parent d728b1f commit ab9ae3a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/pages/video/detail/widgets/header_control.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ class _HeaderControlState extends State<HeaderControl> {
} else {
showTitle = false;
}
setState(() {});

/// TODO setState() called after dispose()
if (mounted) {
setState(() {});
}
});
}

Expand Down

0 comments on commit ab9ae3a

Please sign in to comment.