Skip to content

Commit

Permalink
Add check mounted
Browse files Browse the repository at this point in the history
  • Loading branch information
TaYaKi71751 committed Dec 17, 2023
1 parent 9dbac26 commit a2803ed
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/pages/bookmark/group/group_article_list_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ class _GroupArticleListPageState extends State<GroupArticleListPage> {
void _rebuild() {
_shouldRebuild = true;
itemKeys.clear();
// https://github.com/flutter/flutter/issues/81684
// https://github.com/flutter/flutter/issues/82109
// https://github.com/fluttercommunity/chewie/blob/09659cc32a898c1c308a53e7461ac405fa36b615/lib/src/cupertino_controls.dart#L603
if(!mounted) {
Logger.warning('[_GroupArticleListPageState][_rebuild] _element was null don\'t do setState');
return;
}
setState(() {
_shouldRebuild = true;
key = ObjectKey(const Uuid().v4());
Expand Down

0 comments on commit a2803ed

Please sign in to comment.