From a2803ed5270a42a593c8002aae4d368383a6d885 Mon Sep 17 00:00:00 2001 From: TaYaKi71751 Date: Sun, 17 Dec 2023 11:20:12 +0900 Subject: [PATCH] Add check mounted --- lib/pages/bookmark/group/group_article_list_page.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/pages/bookmark/group/group_article_list_page.dart b/lib/pages/bookmark/group/group_article_list_page.dart index e44d70fa0..0d0982065 100644 --- a/lib/pages/bookmark/group/group_article_list_page.dart +++ b/lib/pages/bookmark/group/group_article_list_page.dart @@ -75,6 +75,13 @@ class _GroupArticleListPageState extends State { 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());