diff --git a/desktop_photo_search/fluent_ui/lib/src/widgets/unsplash_search_content.dart b/desktop_photo_search/fluent_ui/lib/src/widgets/unsplash_search_content.dart index 39663e712..f4ba5aac4 100644 --- a/desktop_photo_search/fluent_ui/lib/src/widgets/unsplash_search_content.dart +++ b/desktop_photo_search/fluent_ui/lib/src/widgets/unsplash_search_content.dart @@ -21,6 +21,12 @@ class UnsplashSearchContent extends StatefulWidget { class _UnsplashSearchContentState extends State { final _treeViewScrollController = ScrollController(); + @override + dispose() { + _treeViewScrollController.dispose(); + super.dispose(); + } + @override Widget build(BuildContext context) { final photoSearchModel = Provider.of(context); diff --git a/desktop_photo_search/material/lib/src/widgets/unsplash_search_content.dart b/desktop_photo_search/material/lib/src/widgets/unsplash_search_content.dart index 8d66212be..30e59946d 100644 --- a/desktop_photo_search/material/lib/src/widgets/unsplash_search_content.dart +++ b/desktop_photo_search/material/lib/src/widgets/unsplash_search_content.dart @@ -22,6 +22,12 @@ class UnsplashSearchContent extends StatefulWidget { class _UnsplashSearchContentState extends State { final _treeViewScrollController = ScrollController(); + @override + dispose() { + _treeViewScrollController.dispose(); + super.dispose(); + } + @override Widget build(BuildContext context) { final photoSearchModel = Provider.of(context);